|
@@ -44,7 +44,10 @@ public class HeliPayNonOrderApi {
|
|
|
*/
|
|
|
@ApiOperation("二手发布-微信线上支付(旧:/PayOrder/appletsSecondHandPay)(/PayOrder/secondHandPay[WEIXIN])")
|
|
|
@PostMapping("/second/wechat")
|
|
|
- public ResponseJson<JSONObject> paySecondByWeChat(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<JSONObject> paySecondByWeChat(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getProductId()) {
|
|
|
return ResponseJson.error("二手商品Id不能为空!", null);
|
|
|
}
|
|
@@ -55,7 +58,7 @@ public class HeliPayNonOrderApi {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 二手发布-微信/支付宝二维码
|
|
|
+ * 二手发布-支付宝二维码
|
|
|
*
|
|
|
* @param heliDto {
|
|
|
* productId 二手发布商品id
|
|
@@ -64,7 +67,10 @@ public class HeliPayNonOrderApi {
|
|
|
*/
|
|
|
@ApiOperation("二手发布-支付宝线上支付(旧:/PayOrder/secondHandPay[ALIPAY])")
|
|
|
@PostMapping("/second/scan")
|
|
|
- public ResponseJson<JSONObject> paySecondByAlipay(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<JSONObject> paySecondByAlipay(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getProductId()) {
|
|
|
return ResponseJson.error("二手商品Id不能为空!", null);
|
|
|
}
|
|
@@ -109,21 +115,25 @@ public class HeliPayNonOrderApi {
|
|
|
}
|
|
|
return payNonOrderService.couponCheck(couponRecordId);
|
|
|
}
|
|
|
- /**
|
|
|
+
|
|
|
+ /**
|
|
|
* 购买优惠券-微信线上支付
|
|
|
*
|
|
|
* @param heliDto {
|
|
|
- * couponId 购买优惠券Id
|
|
|
- * userId userId
|
|
|
- * couponRecordId 购买记录id
|
|
|
- * returnUrl 页面回调地址
|
|
|
- * code 微信小程序code
|
|
|
- * state 微信公众号state参数
|
|
|
- * }
|
|
|
+ * couponId 购买优惠券Id
|
|
|
+ * userId userId
|
|
|
+ * couponRecordId 购买记录id
|
|
|
+ * returnUrl 页面回调地址
|
|
|
+ * code 微信小程序code
|
|
|
+ * state 微信公众号state参数
|
|
|
+ * }
|
|
|
*/
|
|
|
@ApiOperation("购买价值优惠券-微信支付")
|
|
|
@PostMapping("/coupon/wechat")
|
|
|
- public ResponseJson<JSONObject> payCouponByWeChat(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<JSONObject> payCouponByWeChat(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getCouponRecordId()) {
|
|
|
return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
}
|
|
@@ -144,21 +154,27 @@ public class HeliPayNonOrderApi {
|
|
|
|
|
|
@ApiOperation("购买价值优惠券-网银线上支付")
|
|
|
@PostMapping("/coupon/union")
|
|
|
- public ResponseJson<String> payCouponByUnionPay(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<String> payCouponByUnionPay(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getVipRecordId()) {
|
|
|
return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(heliDto.getReturnUrl())) {
|
|
|
- return ResponseJson.error("回调地址不能为空!", null);
|
|
|
- }
|
|
|
if (StringUtils.isEmpty(heliDto.getBankCode())) {
|
|
|
return ResponseJson.error("银行编码不能为空!", null);
|
|
|
}
|
|
|
if (StringUtils.isEmpty(heliDto.getUserType())) {
|
|
|
return ResponseJson.error("银行用户类型不能为空!", null);
|
|
|
}
|
|
|
- if(null==heliDto.getSource()){
|
|
|
- return ResponseJson.error("领取渠道不能为空!",null);
|
|
|
+ if (null == heliDto.getSource()) {
|
|
|
+ return ResponseJson.error("领取渠道不能为空!", null);
|
|
|
+ }
|
|
|
+ if (null == heliDto.getCouponId()) {
|
|
|
+ return ResponseJson.error("优惠券Id不能为空!", null);
|
|
|
+ }
|
|
|
+ if (null == heliDto.getUserId()) {
|
|
|
+ return ResponseJson.error("userId不能为空!", null);
|
|
|
}
|
|
|
return payNonOrderService.couponUnionPay(heliDto, headers);
|
|
|
}
|
|
@@ -167,16 +183,19 @@ public class HeliPayNonOrderApi {
|
|
|
* 购买价值优惠券-微信/支付宝二维码
|
|
|
*
|
|
|
* @param heliDto {
|
|
|
- * couponId 购买优惠券Id
|
|
|
- * userId userId
|
|
|
- * couponRecordId 购买记录id
|
|
|
- * returnUrl 页面回调地址
|
|
|
- * state 微信公众号state参数
|
|
|
+ * couponId 购买优惠券Id
|
|
|
+ * userId userId
|
|
|
+ * couponRecordId 购买记录id
|
|
|
+ * returnUrl 页面回调地址
|
|
|
+ * state 微信公众号state参数
|
|
|
* }
|
|
|
*/
|
|
|
@ApiOperation("购买价值优惠券-支付宝线上支付")
|
|
|
@PostMapping("/coupon/scan")
|
|
|
- public ResponseJson<JSONObject> payCouponByAlipay(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<JSONObject> payCouponByAlipay(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getCouponRecordId()) {
|
|
|
return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
}
|
|
@@ -203,6 +222,7 @@ public class HeliPayNonOrderApi {
|
|
|
}
|
|
|
return payNonOrderService.couponCallback(res);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 二手发布-网银支付回调
|
|
|
*/
|
|
@@ -217,13 +237,13 @@ public class HeliPayNonOrderApi {
|
|
|
|
|
|
@ApiOperation("升级超级会员-网银线上支付")
|
|
|
@PostMapping("/vip/union")
|
|
|
- public ResponseJson<String> paySuperVipByUnionPay(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<String> paySuperVipByUnionPay(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getVipRecordId()) {
|
|
|
return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(heliDto.getReturnUrl())) {
|
|
|
- return ResponseJson.error("回调地址不能为空!", null);
|
|
|
- }
|
|
|
if (StringUtils.isEmpty(heliDto.getBankCode())) {
|
|
|
return ResponseJson.error("银行编码不能为空!", null);
|
|
|
}
|
|
@@ -235,7 +255,10 @@ public class HeliPayNonOrderApi {
|
|
|
|
|
|
@ApiOperation("二手发布-网银线上支付(旧:/PayOrder/secondHandPay[UNIONPAY])")
|
|
|
@PostMapping("/second/union")
|
|
|
- public ResponseJson<String> paySecondByUnionPay(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<String> paySecondByUnionPay(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getProductId()) {
|
|
|
return ResponseJson.error("二手商品Id不能为空!", null);
|
|
|
}
|
|
@@ -263,7 +286,10 @@ public class HeliPayNonOrderApi {
|
|
|
*/
|
|
|
@ApiOperation("升级超级会员-微信线上支付")
|
|
|
@PostMapping("/vip/wechat")
|
|
|
- public ResponseJson<JSONObject> paySuperVipByWeChat(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<JSONObject> paySuperVipByWeChat(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getVipRecordId()) {
|
|
|
return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
}
|
|
@@ -283,7 +309,10 @@ public class HeliPayNonOrderApi {
|
|
|
*/
|
|
|
@ApiOperation("升级超级会员-支付宝线上支付")
|
|
|
@PostMapping("/vip/scan")
|
|
|
- public ResponseJson<JSONObject> paySuperVipByAlipay(HeliDto heliDto, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<JSONObject> paySuperVipByAlipay(HeliDto heliDto, @RequestHeader HttpHeaders headers) throws IntrospectionException, InvocationTargetException, IllegalAccessException {
|
|
|
+ if (StringUtils.isBlank(heliDto.getPayType())) {
|
|
|
+ return ResponseJson.error("支付类型不能为空!", null);
|
|
|
+ }
|
|
|
if (null == heliDto.getVipRecordId()) {
|
|
|
return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
}
|