|
@@ -1,518 +0,0 @@
|
|
|
-//package com.caimei365.order.controller;
|
|
|
-//
|
|
|
-//import com.alibaba.fastjson.JSONObject;
|
|
|
-//import com.caimei365.order.model.ResponseJson;
|
|
|
-//import com.caimei365.order.model.dto.PayCouponDto;
|
|
|
-//import com.caimei365.order.model.dto.PayDto;
|
|
|
-//import com.caimei365.order.model.dto.PaySecondDto;
|
|
|
-//import com.caimei365.order.model.dto.PayVipDto;
|
|
|
-//import com.caimei365.order.service.PayNonOrderService;
|
|
|
-//import io.swagger.annotations.Api;
|
|
|
-//import io.swagger.annotations.ApiOperation;
|
|
|
-//import lombok.RequiredArgsConstructor;
|
|
|
-//import org.apache.commons.lang3.StringUtils;
|
|
|
-//import org.springframework.http.HttpHeaders;
|
|
|
-//import org.springframework.web.bind.annotation.*;
|
|
|
-//
|
|
|
-//import java.security.NoSuchAlgorithmException;
|
|
|
-//import java.security.spec.InvalidKeySpecException;
|
|
|
-//
|
|
|
-///**
|
|
|
-// * 二手发布支付,升级超级会员支付
|
|
|
-// *
|
|
|
-// * @author : Charles
|
|
|
-// * @date : 2021/9/27
|
|
|
-// */
|
|
|
-//@Api(tags = "其他(非订单)支付API")
|
|
|
-//@RestController
|
|
|
-//@RequiredArgsConstructor
|
|
|
-//@RequestMapping("/order/pay")
|
|
|
-//public class PayNonOrderApi {
|
|
|
-//
|
|
|
-// private final PayNonOrderService payNonOrderService;
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 二手发布-微信线上支付
|
|
|
-// *
|
|
|
-// * @param paySecondDto {
|
|
|
-// * productId 二手发布商品id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * code 微信小程序code
|
|
|
-// * state 微信公众号state参数
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("二手发布-微信线上支付(旧:/PayOrder/appletsSecondHandPay)(/PayOrder/secondHandPay[WEIXIN])")
|
|
|
-// @PostMapping("/second/wechat")
|
|
|
-// public ResponseJson<JSONObject> paySecondByWeChat(PaySecondDto paySecondDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == paySecondDto.getProductId()) {
|
|
|
-// return ResponseJson.error("二手商品Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(paySecondDto.getCode())) {
|
|
|
-// return ResponseJson.error("微信code不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.paySecondByWeChat(paySecondDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 二手发布-支付宝线上支付
|
|
|
-// *
|
|
|
-// * @param paySecondDto {
|
|
|
-// * productId 二手发布商品id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("二手发布-支付宝线上支付(旧:/PayOrder/secondHandPay[ALIPAY])")
|
|
|
-// @PostMapping("/second/alipay")
|
|
|
-// public ResponseJson<JSONObject> paySecondByAlipay(PaySecondDto paySecondDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == paySecondDto.getProductId()) {
|
|
|
-// return ResponseJson.error("二手商品Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(paySecondDto.getReturnUrl())) {
|
|
|
-// return ResponseJson.error("回调地址不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.paySecondByAlipay(paySecondDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 二手发布-银联线上支付
|
|
|
-// *
|
|
|
-// * @param paySecondDto {
|
|
|
-// * productId 二手发布商品id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * bankCode 银行编码(银联支付使用)
|
|
|
-// * userType 用户类型(银联支付使用)企业:ENTERPRISE,个人:USER
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("二手发布-银联线上支付(旧:/PayOrder/secondHandPay[UNIONPAY])")
|
|
|
-// @PostMapping("/second/union")
|
|
|
-// public ResponseJson<JSONObject> paySecondByUnionPay(PaySecondDto paySecondDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == paySecondDto.getProductId()) {
|
|
|
-// return ResponseJson.error("二手商品Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(paySecondDto.getReturnUrl())) {
|
|
|
-// return ResponseJson.error("回调地址不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(paySecondDto.getBankCode())) {
|
|
|
-// return ResponseJson.error("银行编码不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(paySecondDto.getUserType())) {
|
|
|
-// return ResponseJson.error("银行用户类型不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.paySecondByUnionPay(paySecondDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 二手发布-支付回调
|
|
|
-// */
|
|
|
-// @ApiOperation("二手发布-支付回调(旧:/PayOrder/secondHandPayCallBack)")
|
|
|
-// @GetMapping("/second/callback")
|
|
|
-// public String paymentSecondCallback(String data) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
|
|
-// if (StringUtils.isBlank(data)) {
|
|
|
-// return "回调参数失败";
|
|
|
-// }
|
|
|
-// return payNonOrderService.paymentSecondCallback(data);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 升级超级会员-微信线上支付
|
|
|
-// *
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * code 微信小程序code
|
|
|
-// * state 微信公众号state参数
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("升级超级会员-微信线上支付")
|
|
|
-// @PostMapping("/vip/wechat")
|
|
|
-// public ResponseJson<JSONObject> paySuperVipByWeChat(PayVipDto payVipDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getCode())) {
|
|
|
-// return ResponseJson.error("微信code不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.paySuperVipByWeChat(payVipDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 升级超级会员-支付宝线上支付
|
|
|
-// *
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("升级超级会员-支付宝线上支付")
|
|
|
-// @PostMapping("/vip/alipay")
|
|
|
-// public ResponseJson<JSONObject> paySuperVipByAlipay(PayVipDto payVipDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getReturnUrl())) {
|
|
|
-// return ResponseJson.error("回调地址不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.paySuperVipByAlipay(payVipDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 升级超级会员-银联线上支付
|
|
|
-// *
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * bankCode 银行编码(银联支付使用)
|
|
|
-// * userType 用户类型(银联支付使用)企业:ENTERPRISE,个人:USER
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("升级超级会员-银联线上支付")
|
|
|
-// @PostMapping("/vip/union")
|
|
|
-// public ResponseJson<JSONObject> paySuperVipByUnionPay(PayVipDto payVipDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getReturnUrl())) {
|
|
|
-// return ResponseJson.error("回调地址不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getBankCode())) {
|
|
|
-// return ResponseJson.error("银行编码不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getUserType())) {
|
|
|
-// return ResponseJson.error("银行用户类型不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.paySuperVipByUnionPay(payVipDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 升级超级会员-银联线上支付
|
|
|
-// *
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("超级会员银联转账")
|
|
|
-// @PostMapping("/vip/transfer/union")
|
|
|
-// public ResponseJson<JSONObject> paySuperVipByTransfer(PayVipDto payVipDto, @RequestHeader HttpHeaders headers){
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.paySuperVipByTransfer(payVipDto, headers);
|
|
|
-// }
|
|
|
-// /**
|
|
|
-// * 升级超级会员-支付回调
|
|
|
-// */
|
|
|
-// @ApiOperation("升级超级会员-支付回调")
|
|
|
-// @GetMapping("/vip/callback")
|
|
|
-// public String paymentSuperVipCallback(String data) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
|
|
-// if (StringUtils.isBlank(data)) {
|
|
|
-// return "回调参数失败";
|
|
|
-// }
|
|
|
-// return payNonOrderService.paymentSuperVipCallback(data);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 升级超级会员-线上退款
|
|
|
-// *
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * code 退款口令
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("升级超级会员-线上退款)")
|
|
|
-// @PostMapping("/vip/online/refund")
|
|
|
-// public ResponseJson<JSONObject> superVipOnlineRefund(PayVipDto payVipDto) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getCode()) || !"SVIP".equals(payVipDto.getCode())) {
|
|
|
-// return ResponseJson.error("退款口令code不正确!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.superVipOnlineRefund(payVipDto);
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// @ApiOperation("购买价值优惠券-获取购买记录id")
|
|
|
-// @PostMapping("/coupon/record")
|
|
|
-// public ResponseJson<PayCouponDto> payCouponGetRecord(PayCouponDto payCouponDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == payCouponDto.getCouponId()) {
|
|
|
-// return ResponseJson.error("优惠券Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getUserId()) {
|
|
|
-// return ResponseJson.error("userId不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.getCouponRecord(payCouponDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 升级超级会员-微信线上支付
|
|
|
-// *
|
|
|
-// * @param payCouponDto {
|
|
|
-// * couponId 购买优惠券Id
|
|
|
-// * userId userId
|
|
|
-// * couponRecordId 购买记录id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * code 微信小程序code
|
|
|
-// * state 微信公众号state参数
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("购买价值优惠券-微信线上支付")
|
|
|
-// @PostMapping("/coupon/wechat")
|
|
|
-// public ResponseJson<JSONObject> payCouponByWeChat(PayCouponDto payCouponDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == payCouponDto.getCouponRecordId()) {
|
|
|
-// return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getSource()) {
|
|
|
-// return ResponseJson.error("领取渠道不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getCouponId()) {
|
|
|
-// return ResponseJson.error("优惠券Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getUserId()) {
|
|
|
-// return ResponseJson.error("userId不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payCouponDto.getCode())) {
|
|
|
-// return ResponseJson.error("微信code不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.payCouponByWeChat(payCouponDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 购买价值优惠券-支付宝线上支付
|
|
|
-// *
|
|
|
-// * @param payCouponDto {
|
|
|
-// * couponRecordId 购买记录id
|
|
|
-// * couponId 购买优惠券Id
|
|
|
-// * userId userId
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("购买价值优惠券-支付宝线上支付")
|
|
|
-// @PostMapping("/coupon/alipay")
|
|
|
-// public ResponseJson<JSONObject> payCouponByAlipay(PayCouponDto payCouponDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == payCouponDto.getCouponRecordId()) {
|
|
|
-// return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getSource()) {
|
|
|
-// return ResponseJson.error("领取渠道不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getCouponId()) {
|
|
|
-// return ResponseJson.error("优惠券Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payCouponDto.getReturnUrl())) {
|
|
|
-// return ResponseJson.error("回调地址不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.payCouponByAlipay(payCouponDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 购买价值优惠券-银联线上支付
|
|
|
-// *
|
|
|
-// * @param payCouponDto {
|
|
|
-// * couponRecordId 购买记录id
|
|
|
-// * userID 用户id
|
|
|
-// * couponId 购买优惠券Id
|
|
|
-// * source 购买渠道
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * bankCode 银行编码(银联支付使用)
|
|
|
-// * userType 用户类型(银联支付使用)企业:ENTERPRISE,个人:USER
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("购买价值优惠券-银联线上支付")
|
|
|
-// @PostMapping("/coupon/union")
|
|
|
-// public ResponseJson<JSONObject> payCouponByUnionPay(PayCouponDto payCouponDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == payCouponDto.getCouponRecordId()) {
|
|
|
-// return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getSource()) {
|
|
|
-// return ResponseJson.error("领取渠道不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getUserId()) {
|
|
|
-// return ResponseJson.error("用户id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getCouponId()) {
|
|
|
-// return ResponseJson.error("优惠券Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payCouponDto.getReturnUrl())) {
|
|
|
-// return ResponseJson.error("回调地址不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payCouponDto.getBankCode())) {
|
|
|
-// return ResponseJson.error("银行编码不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payCouponDto.getUserType())) {
|
|
|
-// return ResponseJson.error("银行用户类型不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.payCouponUnionPay(payCouponDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 购买价值优惠券-银联转账支付
|
|
|
-// *
|
|
|
-// * @param payCouponDto {
|
|
|
-// * couponRecordId 购买记录id
|
|
|
-// * userID 用户id
|
|
|
-// * couponId 购买优惠券Id
|
|
|
-// * source 购买渠道
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("购买价值优惠券-银联转账支付")
|
|
|
-// @PostMapping("/coupon/transfer/union")
|
|
|
-// public ResponseJson<JSONObject> payCouponByTransfer(PayCouponDto payCouponDto, @RequestHeader HttpHeaders headers) {
|
|
|
-// if (null == payCouponDto.getCouponRecordId()) {
|
|
|
-// return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getSource()) {
|
|
|
-// return ResponseJson.error("领取渠道不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getUserId()) {
|
|
|
-// return ResponseJson.error("用户id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (null == payCouponDto.getCouponId()) {
|
|
|
-// return ResponseJson.error("优惠券Id不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.payCouponByTransfer(payCouponDto, headers);
|
|
|
-// }
|
|
|
-// /**
|
|
|
-// * 购买优惠券-查询是否购买成功
|
|
|
-// */
|
|
|
-// @ApiOperation("购买优惠券-查询是否购买成功")
|
|
|
-// @GetMapping("/coupon/check")
|
|
|
-// public ResponseJson couponCheck(Integer couponRecordId) {
|
|
|
-// if (null == couponRecordId) {
|
|
|
-// return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.couponCheck(couponRecordId);
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 购买优惠券-支付回调
|
|
|
-// */
|
|
|
-// @ApiOperation("购买优惠券-支付回调")
|
|
|
-// @GetMapping("/coupon/callback")
|
|
|
-// public String couponCallback(String data) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
|
|
-// if (StringUtils.isBlank(data)) {
|
|
|
-// return "回调参数失败";
|
|
|
-// }
|
|
|
-// return payNonOrderService.couponCallback(data);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 购买优惠券-查询是否购买成功
|
|
|
-// */
|
|
|
-// @ApiOperation("购买超级会员-查询是否购买成功")
|
|
|
-// @GetMapping("/vip/check")
|
|
|
-// public ResponseJson vipCheck(Integer recordId) {
|
|
|
-// if (null == recordId) {
|
|
|
-// return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.vipCheck(recordId);
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 开通认证通会员-微信线上支付
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * code 微信小程序code
|
|
|
-// * state 微信公众号state参数
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("开通认证通会员-微信线上支付")
|
|
|
-// @PostMapping("/auth/vip/wechat")
|
|
|
-// public ResponseJson<JSONObject> payAuthVipByWeChat(PayVipDto payVipDto, @RequestHeader HttpHeaders headers){
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getCode())) {
|
|
|
-// return ResponseJson.error("微信code不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.payAuthVipByWeChat(payVipDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 开通认证通会员-支付宝线上支付
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("开通认证通会员-支付宝线上支付")
|
|
|
-// @PostMapping("/auth/vip/alipay")
|
|
|
-// public ResponseJson<JSONObject> payAuthVipByAlipay(PayVipDto payVipDto, @RequestHeader HttpHeaders headers){
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getReturnUrl())) {
|
|
|
-// return ResponseJson.error("回调地址不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.payAuthVipByAlipay(payVipDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 开通认证通会员-银联线上支付
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * returnUrl 页面回调地址
|
|
|
-// * bankCode 银行编码(银联支付使用)
|
|
|
-// * userType 用户类型(银联支付使用)企业:ENTERPRISE,个人:USER
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("开通认证通会员-银联线上支付")
|
|
|
-// @PostMapping("/auth/vip/union")
|
|
|
-// public ResponseJson<JSONObject> payAuthVipByUnionPay(PayVipDto payVipDto, @RequestHeader HttpHeaders headers){
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getReturnUrl())) {
|
|
|
-// return ResponseJson.error("回调地址不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getBankCode())) {
|
|
|
-// return ResponseJson.error("银行编码不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getUserType())) {
|
|
|
-// return ResponseJson.error("银行用户类型不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.payAuthVipByUnionPay(payVipDto, headers);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 开通认证通会员-支付回调
|
|
|
-// */
|
|
|
-// @ApiOperation("开通认证通会员-支付回调")
|
|
|
-// @GetMapping("/auth/vip/callback")
|
|
|
-// public String paymentAuthVipCallback(String data) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
|
|
-// if (StringUtils.isBlank(data)) {
|
|
|
-// return "回调参数失败";
|
|
|
-// }
|
|
|
-// return payNonOrderService.paymentAuthVipCallback(data);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 开通认证通会员-线上退款
|
|
|
-// * @param payVipDto {
|
|
|
-// * vipRecordId 会员购买记录Id
|
|
|
-// * code 退款口令
|
|
|
-// * }
|
|
|
-// */
|
|
|
-// @ApiOperation("开通认证通会员-线上退款)")
|
|
|
-// @PostMapping("/auth/vip/online/refund")
|
|
|
-// public ResponseJson<JSONObject> authVipOnlineRefund(PayVipDto payVipDto) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
|
|
-// if (null == payVipDto.getVipRecordId()) {
|
|
|
-// return ResponseJson.error("会员购买记录Id不能为空!", null);
|
|
|
-// }
|
|
|
-// if (StringUtils.isEmpty(payVipDto.getCode()) || !"SVIP".equals(payVipDto.getCode())) {
|
|
|
-// return ResponseJson.error("退款口令code不正确!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.superVipOnlineRefund(payVipDto);
|
|
|
-// }
|
|
|
-//
|
|
|
-// @ApiOperation("购买认证通会员-查询是否购买成功")
|
|
|
-// @GetMapping("/auth/vip/check")
|
|
|
-// public ResponseJson authVipCheck(Integer vipRecordId) {
|
|
|
-// if (null == vipRecordId) {
|
|
|
-// return ResponseJson.error("购买记录id不能为空!", null);
|
|
|
-// }
|
|
|
-// return payNonOrderService.authVipCheck(vipRecordId);
|
|
|
-// }
|
|
|
-//}
|