1
sunshine
2024-11-05 92a9e53e82c74d36a72eb92f93777bbb16e2db73
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package com.nova.sankuai.controller.v2;
 
import com.nova.sankuai.domain.api.rongbei.RbResponse;
import com.nova.sankuai.domain.dto.rongbei.CheckDto;
import com.nova.sankuai.infra.utils.rongbei.RongBeiUtil;
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(tags = "融呗产品方接口")
@RequiredArgsConstructor
@Validated
public class RongBeBasicProductController {
    private final RongBeiUtil rongBeUtil;
    private final ZcyUtil zcyUtil;
 
    @PostMapping("check")
    @ApiOperation(value = "准入接口", notes = "检测用户是否满足产品方借款申请的条件")
    ResponseEntity<RbResponse> check(@RequestBody @Valid CheckDto body) {
        log.debug("准入接口测试");
        return ResponseEntity.ok(rongBeUtil.check(body));
    }
 
    @PostMapping("/apply")
    @ApiOperation(value = "进件接口", notes = "提交进件所需全部资料")
    ResponseEntity<RbResponse> apply(@RequestBody @Valid CheckDto body) {
        log.debug("进件接口测试");
        return ResponseEntity.ok(rongBeUtil.apply(body));
    }
 
    @PostMapping("/order_status")
    @ApiOperation(value = "进件接口", notes = "用于流量平台主动查询在产品方的进件订单状态")
    ResponseEntity<RbResponse> orderStatus(@RequestBody @Valid CheckDto body) {
        log.debug("进件接口测试");
        return ResponseEntity.ok(rongBeUtil.orderStatus(body));
    }
 
    @PostMapping("/conclusion")
    @ApiOperation(value = "查询授信结果", notes = "用于流量平台主动查询在产品方进件的授信结果")
    ResponseEntity<RbResponse> conclusion(@RequestBody @Valid CheckDto body) {
        log.debug("进件接口测试");
        return ResponseEntity.ok(rongBeUtil.conclusion(body));
    }
 
    @PostMapping("/repay_info")
    @ApiOperation(value = "查询还款计划接口", notes = "用于流量平台主动查询在产品方放款订单的还款计划")
    ResponseEntity<RbResponse> repayInfo(@RequestBody @Valid CheckDto body) {
        log.debug("查询还款计划接口测试");
        return ResponseEntity.ok(rongBeUtil.repayInfo(body));
    }
 
    @PostMapping("/h5_url")
    @ApiOperation(value = "获取跳转H5页面地址接口", notes = "获取产品方联登后的H5页面URL,访问该URL将跳转到产品方的页面")
    ResponseEntity<RbResponse> h5Url(@RequestBody @Valid CheckDto body) {
        log.debug("获取跳转H5页面地址接口测试");
        return ResponseEntity.ok(rongBeUtil.h5Url(body));
    }
 
}