1
Sunshine
2024-11-05 1ec0f818f512186b3af02637906632264fe97119
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.nova.sankuai.controller.v2;
 
import com.nova.sankuai.domain.api.zcy.ZcyResponse;
import com.nova.sankuai.domain.dto.zcy.CustomerZcyDto;
import com.nova.sankuai.infra.utils.zcy.ZcyUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.validation.Valid;
 
@Slf4j
@RestController
@RequestMapping(value = "/api/v2/traffic/tff/callback")
@Api(tags = "融呗方接口")
@RequiredArgsConstructor
@Validated
public class RongBeBasicController {
    private final ZcyUtil zcyUtil;
    @PostMapping("/order_status")
    @ApiOperation(value = "接受订单状态接口", notes = "产品方的订单状态存在变更,可通过此接口触发推送")
    ResponseEntity<ZcyResponse> orderStatus(@RequestBody @Valid CustomerZcyDto body) {
        log.debug("接受订单状态接口测试");
        return ResponseEntity.ok(zcyUtil.callback(body));
    }
 
    @PostMapping("/credit_result")
    @ApiOperation(value = "接受授信结果接口", notes = "产品方的订单状态存在变更,可通过此接口触发推送")
    ResponseEntity<ZcyResponse> creditResult(@RequestBody @Valid CustomerZcyDto body) {
        log.debug("接受授信结果接口测试");
        return ResponseEntity.ok(zcyUtil.callback(body));
    }
 
    @PostMapping("/repay_info")
    @ApiOperation(value = "接受还款计划接口", notes = "可通过此接口触发推送已放款订单的还款计划")
    ResponseEntity<ZcyResponse> repayInfo(@RequestBody @Valid CustomerZcyDto body) {
        log.debug("接受还款计划接口测试");
        return ResponseEntity.ok(zcyUtil.callback(body));
    }
 
}