From 6497e0daf1d0afc3da65a11d389c740e79427a78 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 24 七月 2024 14:08:11 +0800
Subject: [PATCH] 2024-07-24 朱宝民 整点报历史记录查询、管理卡创建

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
index a9242eb..f035d06 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
@@ -12,7 +12,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;
@@ -54,9 +53,9 @@
                             schema = @Schema(implementation = VoUnlock.class))}
             )
     })
-    @GetMapping(path = "/getUnlocks", consumes = MediaType.APPLICATION_JSON_VALUE)
+    @GetMapping(path = "/getUnlocks")
     @SsoAop()
-    public BaseResponse<QueryResultVo<List<VoUnlock>>> getUnlocks(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) QueryVo vo){
+    public BaseResponse<QueryResultVo<List<VoUnlock>>> getUnlocks(QueryVo vo){
         try {
             QueryResultVo<List<VoUnlock>> res = unlockSv.getUnlocks(vo);
             return BaseResponseUtils.buildSuccess(res);
@@ -78,7 +77,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 DtoUnlock po, @Parameter(hidden = true) BindingResult bindingResult){
+    public BaseResponse<Boolean> add(@RequestBody @Valid DtoUnlock po, BindingResult bindingResult){
         DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
@@ -86,16 +85,16 @@
 
         /**
          * cardId           姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛屼慨鏀瑰啘鎴峰崱浣跨敤锛�
+         * clientId         鍐滄埛缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardNum鍙嶆煡锛�
          * cardNum          姘村崱鍦板潃
-         * clientNum        鍐滄埛缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardNum鍙嶆煡锛屾坊鍔犺В閿佷娇鐢級
          * money            浣欓
          * remarks          澶囨敞
          * operator         鎿嶄綔浜虹紪鍙�
          * unlockTime       瑙i攣鏃堕棿
          */
         Long cardId = 0L;
-        String cardNum = po.getCardNum();
-        String clientNum = "";
+        Long cardNum = po.getCardNum();
+        Long clientId = 0L;
         Float money = po.getMoney();
         String remarks = po.getRemarks();
         Long operator = po.getOperator();
@@ -109,7 +108,7 @@
             return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage());
         }
         cardId = Long.parseLong(map.get("cardId").toString());
-        clientNum = map.get("clientNum").toString();
+        clientId = Long.parseLong(map.get("clientId").toString());
 
         /**
          * 淇敼鍐滄埛鍗′俊鎭細
@@ -119,6 +118,7 @@
         SeClientCard seClientCard = new SeClientCard();
         seClientCard.setId(cardId);
         seClientCard.setUnlockdt(unlockTime);
+        seClientCard.setMoney(money);
         seClientCard.setLastoper(LastOperateENUM.UNLOCK.getCode());
         Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);
         if(rec_updateClientCard == 0) {
@@ -129,8 +129,10 @@
          * 娣诲姞瑙i攣璁板綍
          */
         SeUnlock seUnlock = new SeUnlock();
-        seUnlock.setCardnum(cardNum);
-        seUnlock.setClientnum(clientNum);
+        //seUnlock.setCardnum(cardNum);
+        //seUnlock.setClientnum(clientNum);
+        seUnlock.setCardid(cardId);
+        seUnlock.setClientid(clientId);
         seUnlock.setMoney(money);
         seUnlock.setRemarks(remarks);
         seUnlock.setOperator(operator);

--
Gitblit v1.8.0