xuhy
2025-01-09 712f70b2936079a131ecb1e63c6d337171618cad
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
//package com.stylefeng.guns.modular.cloudPayment.controller;
//
//import com.google.gson.Gson;
//import com.stylefeng.guns.modular.cloudPayment.example.CusApplicationExample;
//import com.stylefeng.guns.modular.system.model.UserWithdrawal;
//import com.stylefeng.guns.modular.system.util.ResultUtil;
//import com.unionpay.upyzt.exception.UpyztException;
//import com.unionpay.upyzt.resp.CusApplicationResp;
//import com.unionpay.upyzt.resp.CusApplicationSmsCodeResp;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//@Api(tags = "个人用户进件")
//@Slf4j
//@RestController
//@RequestMapping("/api/openAccount")
//public class OpenAccountController {
//
//    @Autowired
//    private Gson gson;
//
//    /**
//     * 个人用户进件-短信验证码
//     * @param phone 手机号
//     * @return 返回参数
//     * @throws Exception 异常
//     */
//    @ResponseBody
//    @PostMapping("/smsCode")
//    @ApiOperation(value = "个人用户进件-短信验证码", tags = {"用户端-云闪付相关"}, notes = "")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
//    })
//    public ResultUtil<CusApplicationSmsCodeResp> smsCode(@RequestBody String phone){
//        CusApplicationSmsCodeResp cusApplicationSmsCodeResp;
//        try{
//            // 个人用户进件-短信验证码
//            cusApplicationSmsCodeResp = CusApplicationExample.smsCode(phone);
//            log.info("------- 个人用户进件-短信验证码 ------- {} ", gson.toJson(cusApplicationSmsCodeResp));
//        }catch (Exception e){
//            log.error("个人用户进件-短信验证码失败!!!:{}",e.getMessage());
//            e.printStackTrace();
//            return ResultUtil.error("个人用户进件-短信验证码失败!!!");
//        }
//        return ResultUtil.success(cusApplicationSmsCodeResp);
//    }
//
//    /**
//     * 个人用户首次进件
//     * @param userWithdrawal 个人账户对象
//     * @return 返回参数
//     * @throws Exception 异常
//     */
//    @ResponseBody
//    @PostMapping("/openIndividualUser")
//    @ApiOperation(value = "个人用户首次进件", tags = {"用户端-云闪付相关"}, notes = "")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
//    })
//    public ResultUtil<CusApplicationResp> openIndividualUser(@RequestBody UserWithdrawal userWithdrawal){
//        CusApplicationResp cusApplicationResp;
//        try{
//            // 个人用户首次进件
//            cusApplicationResp = CusApplicationExample.create(userWithdrawal);
//            log.info("------- 个人用户首次进件 ------- {} ", gson.toJson(cusApplicationResp));
//        }catch (Exception e){
//            log.error("个人用户进件失败!!!:{}",e.getMessage());
//            e.printStackTrace();
//            return ResultUtil.error("个人用户进件失败!!!");
//        }
//        return ResultUtil.success(cusApplicationResp);
//    }
//
//    /**
//     * 个人用户进件状态查询(系统订单号)
//     * @param cusApplicationId 系统订单号
//     * @return 返回参数
//     * @throws UpyztException 异常
//     */
//    @ResponseBody
//    @PostMapping("/queryIndividualUserStatusByCusApplicationId")
//    @ApiOperation(value = "个人用户进件状态查询(系统订单号)", tags = {"用户端-云闪付相关"}, notes = "")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
//    })
//    public ResultUtil<CusApplicationResp> queryIndividualUserStatusByCusApplicationId(@RequestBody String cusApplicationId){
//        CusApplicationResp cusApplicationResp;
//        try{
//            // 个人用户进件状态查询(系统订单号)
//            cusApplicationResp = CusApplicationExample.retrieveById(cusApplicationId);
//            log.info("------- 个人用户进件状态查询 ------- {} ", gson.toJson(cusApplicationResp));
//        }catch (UpyztException e){
//            log.error("个人用户进件状态查询失败!!!:{}",e.getMessage());
//            e.printStackTrace();
//            return ResultUtil.error("个人用户进件状态查询失败!!!");
//        }
//        return ResultUtil.success(cusApplicationResp);
//    }
//
//    /**
//     * 修改个人用户信息
//     * @param userWithdrawal 个人账户对象
//     * @return 返回参数
//     * @throws UpyztException 异常
//     */
//    @ResponseBody
//    @PostMapping("/updateIndividualUserInfo")
//    @ApiOperation(value = "修改个人用户信息(系统订单号)", tags = {"用户端-云闪付相关"}, notes = "")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
//    })
//    public ResultUtil<CusApplicationResp> updateIndividualUserInfo(@RequestBody UserWithdrawal userWithdrawal){
//        CusApplicationResp cusApplicationResp;
//        try{
//            // 修改个人用户信息
//            cusApplicationResp = CusApplicationExample.renew(userWithdrawal);
//            log.info("------- 修改个人用户信息 ------- {} ", gson.toJson(cusApplicationResp));
//        }catch (Exception e){
//            log.error("修改个人用户信息失败!!!:{}",e.getMessage());
//            e.printStackTrace();
//            return ResultUtil.error("修改个人用户信息失败!!!");
//        }
//        return ResultUtil.success(cusApplicationResp);
//    }
//
//    /**
//     * 个人用户进件状态查询(平台订单号)
//     * @param userWithdrawal 个人账户对象
//     * @return 返回参数
//     * @throws UpyztException 异常
//     */
//    @ResponseBody
//    @PostMapping("/queryIndividualUserStatusByOutRequestNo")
//    @ApiOperation(value = "个人用户进件状态查询(平台订单号)", tags = {"用户端-云闪付相关"}, notes = "")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
//    })
//    public ResultUtil<CusApplicationResp> queryIndividualUserStatusByOutRequestNo(@RequestBody UserWithdrawal userWithdrawal){
//        CusApplicationResp cusApplicationResp;
//        try{
//            // 个人用户进件状态查询(平台订单号)
//            cusApplicationResp = CusApplicationExample.renew(userWithdrawal);
//            log.info("------- 个人用户进件状态查询(平台订单号) ------- {} ", gson.toJson(cusApplicationResp));
//        }catch (Exception e){
//            log.error("个人用户进件状态查询(平台订单号)失败!!!:{}",e.getMessage());
//            e.printStackTrace();
//            return ResultUtil.error("个人用户进件状态查询(平台订单号)失败!!!");
//        }
//        return ResultUtil.success(cusApplicationResp);
//    }
//
//}