正在显示
6 个修改的文件
包含
57 行增加
和
18 行删除
| @@ -51,7 +51,16 @@ public class UserPayController { | @@ -51,7 +51,16 @@ public class UserPayController { | ||
| 51 | 51 | ||
| 52 | return waterMeterService.payWater(payFees, wmId); | 52 | return waterMeterService.payWater(payFees, wmId); |
| 53 | } | 53 | } |
| 54 | - | 54 | + /** |
| 55 | + * 水电系统发起 | ||
| 56 | + * @param payFees | ||
| 57 | + * @param wmId | ||
| 58 | + * @param userId | ||
| 59 | + * @param realName | ||
| 60 | + * @param eeId | ||
| 61 | + * @return | ||
| 62 | + * @throws UnsupportedEncodingException | ||
| 63 | + */ | ||
| 55 | @ApiOperation(value = "请求返回二维码") | 64 | @ApiOperation(value = "请求返回二维码") |
| 56 | @PostMapping("/qrCode") | 65 | @PostMapping("/qrCode") |
| 57 | public ResultJson qrCode(@RequestParam(value = "payFees", required = false) String payFees, | 66 | public ResultJson qrCode(@RequestParam(value = "payFees", required = false) String payFees, |
| @@ -60,7 +69,29 @@ public class UserPayController { | @@ -60,7 +69,29 @@ public class UserPayController { | ||
| 60 | @RequestParam(value = "realName", required = false) String realName, | 69 | @RequestParam(value = "realName", required = false) String realName, |
| 61 | @RequestParam(value = "deviceId", required = false) String eeId) throws UnsupportedEncodingException { | 70 | @RequestParam(value = "deviceId", required = false) String eeId) throws UnsupportedEncodingException { |
| 62 | 71 | ||
| 63 | - ResultJson resultJson = waterMeterService.qrCode(payFees, wmId, userId, realName, eeId); | 72 | + ResultJson resultJson = waterMeterService.qrCode(payFees, wmId, userId, realName, eeId, "0"); |
| 73 | + return resultJson; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * 钉钉小程序发起 | ||
| 78 | + * @param payFees | ||
| 79 | + * @param wmId | ||
| 80 | + * @param userId | ||
| 81 | + * @param realName | ||
| 82 | + * @param eeId | ||
| 83 | + * @return | ||
| 84 | + * @throws UnsupportedEncodingException | ||
| 85 | + */ | ||
| 86 | + @ApiOperation(value = "请求返回二维码") | ||
| 87 | + @PostMapping("/ddQrCode") | ||
| 88 | + public ResultJson ddQrCode(@RequestParam(value = "payFees", required = false) String payFees, | ||
| 89 | + @RequestParam(value = "wmId", required = false) String wmId, | ||
| 90 | + @RequestParam(value = "userId", required = false) String userId, | ||
| 91 | + @RequestParam(value = "realName", required = false) String realName, | ||
| 92 | + @RequestParam(value = "deviceId", required = false) String eeId) throws UnsupportedEncodingException { | ||
| 93 | + | ||
| 94 | + ResultJson resultJson = waterMeterService.qrCode(payFees, wmId, userId, realName, eeId, "1"); | ||
| 64 | return resultJson; | 95 | return resultJson; |
| 65 | } | 96 | } |
| 66 | 97 |
| @@ -17,7 +17,7 @@ public class PayRecords { | @@ -17,7 +17,7 @@ public class PayRecords { | ||
| 17 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | 17 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| 18 | private Date paytime; | 18 | private Date paytime; |
| 19 | 19 | ||
| 20 | - private Integer paylocationid; | 20 | + private String paylocationid; |
| 21 | 21 | ||
| 22 | private Boolean paystatus; | 22 | private Boolean paystatus; |
| 23 | 23 | ||
| @@ -82,11 +82,11 @@ public class PayRecords { | @@ -82,11 +82,11 @@ public class PayRecords { | ||
| 82 | this.paytime = paytime; | 82 | this.paytime = paytime; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | - public Integer getPaylocationid() { | 85 | + public String getPaylocationid() { |
| 86 | return paylocationid; | 86 | return paylocationid; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | - public void setPaylocationid(Integer paylocationid) { | 89 | + public void setPaylocationid(String paylocationid) { |
| 90 | this.paylocationid = paylocationid; | 90 | this.paylocationid = paylocationid; |
| 91 | } | 91 | } |
| 92 | 92 |
| @@ -19,7 +19,7 @@ public interface WaterMeterService { | @@ -19,7 +19,7 @@ public interface WaterMeterService { | ||
| 19 | /** | 19 | /** |
| 20 | * 请求返回二维码 | 20 | * 请求返回二维码 |
| 21 | */ | 21 | */ |
| 22 | - ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId) throws UnsupportedEncodingException; | 22 | + ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId, String payType) throws UnsupportedEncodingException; |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | } | 25 | } |
| @@ -200,12 +200,13 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -200,12 +200,13 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
| 200 | 200 | ||
| 201 | // 请求返回二维码 | 201 | // 请求返回二维码 |
| 202 | @Override | 202 | @Override |
| 203 | - public ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId) throws UnsupportedEncodingException { | 203 | + public ResultJson qrCode(String payFees, String wmId, String userId, |
| 204 | + String realName, String eeId, String payType) throws UnsupportedEncodingException { | ||
| 204 | ResultJson<Object> resultJson = new ResultJson<>(); | 205 | ResultJson<Object> resultJson = new ResultJson<>(); |
| 205 | QrDemo qrDemo = new QrDemo(MERCHANTIDS,POSIDS,BRANCHIDS,TXCODES,PUB32TR2S); | 206 | QrDemo qrDemo = new QrDemo(MERCHANTIDS,POSIDS,BRANCHIDS,TXCODES,PUB32TR2S); |
| 206 | // 成功生成水费订单 | 207 | // 成功生成水费订单 |
| 207 | if (!"".equals(wmId)) { | 208 | if (!"".equals(wmId)) { |
| 208 | - PayRecords payRecords = payRecords(payFees, wmId, userId, realName, ""); | 209 | + PayRecords payRecords = payRecords(payFees, wmId, userId, realName, "", payType); |
| 209 | // 请求返回二维码lujing | 210 | // 请求返回二维码lujing |
| 210 | String url = qrDemo.orUrl(payRecords.getOrdernumber(), payFees); | 211 | String url = qrDemo.orUrl(payRecords.getOrdernumber(), payFees); |
| 211 | 212 | ||
| @@ -222,8 +223,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -222,8 +223,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
| 222 | resultJson.setCode("200"); | 223 | resultJson.setCode("200"); |
| 223 | } | 224 | } |
| 224 | } else { | 225 | } else { |
| 225 | - | ||
| 226 | - PayRecords payRecords = payRecords(payFees, "", userId, realName, eeId); | 226 | + PayRecords payRecords = payRecords(payFees, "", userId, realName, eeId, payType); |
| 227 | // 请求返回二维码lujing | 227 | // 请求返回二维码lujing |
| 228 | String url = qrDemo.orUrl(payRecords.getOrdernumber(), payFees); | 228 | String url = qrDemo.orUrl(payRecords.getOrdernumber(), payFees); |
| 229 | 229 | ||
| @@ -280,7 +280,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -280,7 +280,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
| 280 | * @param realName | 280 | * @param realName |
| 281 | * @return | 281 | * @return |
| 282 | */ | 282 | */ |
| 283 | - public PayRecords payRecords(String payFees, String wmId, String userId, String realName, String eeId) { | 283 | + public PayRecords payRecords(String payFees, String wmId, String userId, String realName, String eeId, String payType) { |
| 284 | 284 | ||
| 285 | PayRecords payRecords = new PayRecords(); | 285 | PayRecords payRecords = new PayRecords(); |
| 286 | payRecords.setOrdernumber(AllUtils.getOrderIdByUUId()); | 286 | payRecords.setOrdernumber(AllUtils.getOrderIdByUUId()); |
| @@ -298,9 +298,17 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -298,9 +298,17 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
| 298 | payRecords.setPaylocationname(roomNumber); | 298 | payRecords.setPaylocationname(roomNumber); |
| 299 | } | 299 | } |
| 300 | payRecords.setReamke1("0"); | 300 | payRecords.setReamke1("0"); |
| 301 | - payRecords.setPayuserid(Integer.valueOf(userId)); | 301 | + if (userId.contains(",")){ |
| 302 | + String[] split = userId.split(","); | ||
| 303 | + payRecords.setPayusername(split[0]); | ||
| 304 | + payRecords.setPayuserid(0); | ||
| 305 | + payRecords.setPaylocationid(split[2]); | ||
| 306 | + }else { | ||
| 307 | + payRecords.setPayuserid(Integer.valueOf(userId)); | ||
| 308 | + payRecords.setPayusername(realName); | ||
| 309 | + } | ||
| 302 | payRecords.setPaytime(new Date()); | 310 | payRecords.setPaytime(new Date()); |
| 303 | - payRecords.setPayusername(realName); | 311 | + payRecords.setReamke4(payType); |
| 304 | 312 | ||
| 305 | 313 | ||
| 306 | return payRecords; | 314 | return payRecords; |
| @@ -22,4 +22,4 @@ ${AnsiColor.YELLOW} | @@ -22,4 +22,4 @@ ${AnsiColor.YELLOW} | ||
| 22 | ================================================== | 22 | ================================================== |
| 23 | Application Info:${application.title} | 23 | Application Info:${application.title} |
| 24 | ver:${application.version} | 24 | ver:${application.version} |
| 25 | -Powered by:Spring Boot ${spring-boot.version} | ||
| 25 | +Powered by:Spring Boot ${spring-boot.version} |
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | <result column="payFees" property="payfees" jdbcType="DECIMAL"/> | 6 | <result column="payFees" property="payfees" jdbcType="DECIMAL"/> |
| 7 | <result column="payUserId" property="payuserid" jdbcType="INTEGER"/> | 7 | <result column="payUserId" property="payuserid" jdbcType="INTEGER"/> |
| 8 | <result column="payTime" property="paytime" jdbcType="TIMESTAMP"/> | 8 | <result column="payTime" property="paytime" jdbcType="TIMESTAMP"/> |
| 9 | - <result column="payLocationId" property="paylocationid" jdbcType="INTEGER"/> | 9 | + <result column="payLocationId" property="paylocationid" jdbcType="VARCHAR"/> |
| 10 | <result column="payStatus" property="paystatus" jdbcType="BIT"/> | 10 | <result column="payStatus" property="paystatus" jdbcType="BIT"/> |
| 11 | <result column="payType" property="paytype" jdbcType="BIT"/> | 11 | <result column="payType" property="paytype" jdbcType="BIT"/> |
| 12 | <result column="payFessType" property="payfesstype" jdbcType="BIT"/> | 12 | <result column="payFessType" property="payfesstype" jdbcType="BIT"/> |
| @@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
| 84 | reamke4, payUserName, payLocationName, | 84 | reamke4, payUserName, payLocationName, |
| 85 | payTypeAddress) | 85 | payTypeAddress) |
| 86 | values (#{id,jdbcType=INTEGER}, #{payfees,jdbcType=DECIMAL}, #{payuserid,jdbcType=INTEGER}, | 86 | values (#{id,jdbcType=INTEGER}, #{payfees,jdbcType=DECIMAL}, #{payuserid,jdbcType=INTEGER}, |
| 87 | - #{paytime,jdbcType=TIMESTAMP}, #{paylocationid,jdbcType=INTEGER}, #{paystatus,jdbcType=BIT}, | 87 | + #{paytime,jdbcType=TIMESTAMP}, #{paylocationid,jdbcType=VARCHAR}, #{paystatus,jdbcType=BIT}, |
| 88 | #{paytype,jdbcType=BIT}, #{payfesstype,jdbcType=BIT}, #{ordernumber,jdbcType=VARCHAR}, | 88 | #{paytype,jdbcType=BIT}, #{payfesstype,jdbcType=BIT}, #{ordernumber,jdbcType=VARCHAR}, |
| 89 | #{reamke1,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, #{reamke3,jdbcType=VARCHAR}, | 89 | #{reamke1,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, #{reamke3,jdbcType=VARCHAR}, |
| 90 | #{reamke4,jdbcType=VARCHAR}, #{payusername,jdbcType=VARCHAR}, #{paylocationname,jdbcType=VARCHAR}, | 90 | #{reamke4,jdbcType=VARCHAR}, #{payusername,jdbcType=VARCHAR}, #{paylocationname,jdbcType=VARCHAR}, |
| @@ -156,7 +156,7 @@ | @@ -156,7 +156,7 @@ | ||
| 156 | #{paytime,jdbcType=TIMESTAMP}, | 156 | #{paytime,jdbcType=TIMESTAMP}, |
| 157 | </if> | 157 | </if> |
| 158 | <if test="paylocationid != null"> | 158 | <if test="paylocationid != null"> |
| 159 | - #{paylocationid,jdbcType=INTEGER}, | 159 | + #{paylocationid,jdbcType=VARCHAR}, |
| 160 | </if> | 160 | </if> |
| 161 | <if test="paystatus != null"> | 161 | <if test="paystatus != null"> |
| 162 | #{paystatus,jdbcType=BIT}, | 162 | #{paystatus,jdbcType=BIT}, |
| @@ -206,7 +206,7 @@ | @@ -206,7 +206,7 @@ | ||
| 206 | payTime = #{paytime,jdbcType=TIMESTAMP}, | 206 | payTime = #{paytime,jdbcType=TIMESTAMP}, |
| 207 | </if> | 207 | </if> |
| 208 | <if test="paylocationid != null"> | 208 | <if test="paylocationid != null"> |
| 209 | - payLocationId = #{paylocationid,jdbcType=INTEGER}, | 209 | + payLocationId = #{paylocationid,jdbcType=VARCHAR}, |
| 210 | </if> | 210 | </if> |
| 211 | <if test="paystatus != null"> | 211 | <if test="paystatus != null"> |
| 212 | payStatus = #{paystatus,jdbcType=BIT}, | 212 | payStatus = #{paystatus,jdbcType=BIT}, |
-
请 注册 或 登录 后发表评论