diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java index 45b4145bc..a0104b3fb 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java @@ -61,14 +61,14 @@ public class CardValueRecordController extends BaseController { } /** - * 新增数据 + * 储值卡充值 * * @param cardValueRecord 实体对象 * @return 新增结果 */ @PostMapping - public ResponseObject insert(@RequestBody CardValueRecord cardValueRecord) { - return getSuccessResult(this.cardValueRecordService.insert(cardValueRecord)); + public ResponseObject insert(@RequestBody CardValueRecordDTO cardValueRecordDTO) { + return getSuccessResult(this.cardValueRecordService.insert(cardValueRecordDTO)); } /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueRecordService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueRecordService.java index 595af1bff..832b78671 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueRecordService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueRecordService.java @@ -23,7 +23,7 @@ public interface CardValueRecordService extends IService { * @param cardValueRecord * @return */ - boolean insert(CardValueRecord cardValueRecord); + boolean insert(CardValueRecordDTO cardValueRecordDTO); /** * 余额充值 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java index 6381e4044..76bc91da2 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java @@ -72,12 +72,64 @@ public class CardValueRecordServiceImpl extends ServiceImpl map = new HashMap<>(); + map.put("authCode",cardValueRecordDTO.getAuthCode()); + map.put("allAmount",allAmount.toString()); + map.put("orderNo",orderNo); + map.put("payType",cardValueRecordDTO.getPaymentType()); + map.put("insCd",merchantConfig.getInsCd()); + map.put("mchntCd",merchantConfig.getMchntCd()); + map.put("goodsDes",merchantConfig.getMerchantName()); + map.put("publicKey",merchantConfig.getPublicKey()); + map.put("privateKey",merchantConfig.getPrivateKey()); + map.put("type","CVR"); + map.put("orderId",cardValueRecordDTO.getId().toString()); + + // 调用支付接口 + try { + fyPayService.applet(map); + pay = true; + } catch (Exception e){ + e.printStackTrace(); + } + // 支付 payment_type + return pay; }