ab
2024-11-05 bead00668eebce8d39d027515d564376de2f5978
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
package com.nova.sankuai.controller.v2;
 
import com.nova.sankuai.domain.api.huizhixin.*;
import com.nova.sankuai.domain.api.huizhixin.vo.*;
import com.nova.sankuai.infra.config.CommonException;
import com.nova.sankuai.service.IHzxService;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.web.bind.annotation.*;
 
import java.util.Objects;
 
/**
 * @Description 汇智信Controller
 * @Author CWR
 * @Date 2022/4/4 16:02
 */
@Api(tags = "汇智信")
@RestController
@RequestMapping(value = "/api/v2/hzx")
@AllArgsConstructor
@Slf4j
public class HzxV2Controller {
 
    private final IHzxService hzxService;
 
 
    /**
     * 获取订单信息
     *
     * @param vo
     * @return
     */
    @PostMapping("/load_apply_ext_info")
    public EncryptResponse orderInfo (@RequestBody RequestVo vo) throws Exception{
        if (vo == null
                || StringUtils.isEmpty(vo.getContent())
                || StringUtils.isEmpty(vo.getSign())) {
            throw new CommonException("参数错误");
        }
        return this.hzxService.orderInfo(vo);
    }
 
    /**
     * 汇智信回调
     */
    @PostMapping("/hzxCallBak")
    public CallbackVo callBack(@RequestBody RequestVo vo) throws Exception {
        if (Objects.isNull(vo)
                || StringUtils.isEmpty(vo.getContent())
                || StringUtils.isEmpty(vo.getSign())) {
            throw new CommonException("参数错误");
        }
        return hzxService.callBack(vo);
    }
 
}