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 check(@RequestBody @Valid CheckDto body) { log.debug("准入接口测试"); return ResponseEntity.ok(rongBeUtil.check(body)); } @PostMapping("/apply") @ApiOperation(value = "进件接口", notes = "提交进件所需全部资料") ResponseEntity apply(@RequestBody @Valid CheckDto body) { log.debug("进件接口测试"); return ResponseEntity.ok(rongBeUtil.apply(body)); } @PostMapping("/order_status") @ApiOperation(value = "进件接口", notes = "用于流量平台主动查询在产品方的进件订单状态") ResponseEntity orderStatus(@RequestBody @Valid CheckDto body) { log.debug("进件接口测试"); return ResponseEntity.ok(rongBeUtil.orderStatus(body)); } @PostMapping("/conclusion") @ApiOperation(value = "查询授信结果", notes = "用于流量平台主动查询在产品方进件的授信结果") ResponseEntity conclusion(@RequestBody @Valid CheckDto body) { log.debug("进件接口测试"); return ResponseEntity.ok(rongBeUtil.conclusion(body)); } @PostMapping("/repay_info") @ApiOperation(value = "查询还款计划接口", notes = "用于流量平台主动查询在产品方放款订单的还款计划") ResponseEntity repayInfo(@RequestBody @Valid CheckDto body) { log.debug("查询还款计划接口测试"); return ResponseEntity.ok(rongBeUtil.repayInfo(body)); } @PostMapping("/h5_url") @ApiOperation(value = "获取跳转H5页面地址接口", notes = "获取产品方联登后的H5页面URL,访问该URL将跳转到产品方的页面") ResponseEntity h5Url(@RequestBody @Valid CheckDto body) { log.debug("获取跳转H5页面地址接口测试"); return ResponseEntity.ok(rongBeUtil.h5Url(body)); } }