From b8732848e6343f05c320f47a47627869e9c57176 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 07 六月 2024 16:21:33 +0800
Subject: [PATCH] 修改 开卡(充值)接口 开卡返回开卡ID 充值返回充值ID

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
index ac8c55a..2c1d508 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
@@ -13,7 +13,6 @@
 import com.dy.pipIrrSell.clientCard.LastOperateENUM;
 import com.dy.pipIrrSell.result.SellResultCode;
 import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.media.Content;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -47,9 +46,10 @@
                             schema = @Schema(implementation = VoRecharge.class))}
             )
     })
-    @GetMapping(path = "/getRecharges", consumes = MediaType.APPLICATION_JSON_VALUE)
+    //@GetMapping(path = "/getRecharges", consumes = MediaType.APPLICATION_JSON_VALUE)
+    @GetMapping(path = "/getRecharges")
     @SsoAop()
-    public BaseResponse<QueryResultVo<List<VoRecharge>>> get(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) QueryVo vo){
+    public BaseResponse<QueryResultVo<List<VoRecharge>>> get(QueryVo vo){
         try {
             QueryResultVo<List<VoRecharge>> res = rechargeSv.getRecharges(vo);
             return BaseResponseUtils.buildSuccess(res);
@@ -71,7 +71,7 @@
     @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
     @Transactional(rollbackFor = Exception.class)
     @SsoAop()
-    public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoRecharge po, @Parameter(hidden = true) BindingResult bindingResult){
+    public BaseResponse<Boolean> add(@RequestBody @Valid DtoRecharge po, BindingResult bindingResult){
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
         }
@@ -99,7 +99,7 @@
          * rechargeTime     鍏呭�兼椂闂�
          */
         Long cardId = 0L;
-        String cardNum = po.getCardNum();
+        Long cardNum = po.getCardNum();
         String clientNum = "";
         //Long clientId = po.getClientId();
         Long clientId = 0L;
@@ -131,6 +131,7 @@
          */
         SeClientCard seClientCard = new SeClientCard();
         seClientCard.setId(cardId);
+        seClientCard.setMoney(afterRecharge);
         seClientCard.setRechargedt(rechargeTime);
         seClientCard.setLastoper(LastOperateENUM.RECHARGE.getCode ());
         Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);

--
Gitblit v1.8.0