From e5ac29afd5569196a54bd4f77457848afc7adf55 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 24 十月 2024 11:47:25 +0800
Subject: [PATCH] 2024-10-24 朱宝民 添加反写接口,完善各相关查询接口,兼容反写信息

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java |  107 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 106 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java
index 005da2c..dda7296 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java
@@ -7,6 +7,10 @@
 import com.dy.common.webUtil.ResultCodeMsg;
 import com.dy.pipIrrGlobal.pojoBa.BaClient;
 import com.dy.pipIrrGlobal.voSe.VoCardInfo;
+import com.dy.pipIrrGlobal.voSe.VoCards;
+import com.dy.pipIrrGlobal.voSe.VoCards2;
+import com.dy.pipIrrSell.clientCard.qo.QoCards;
+import com.dy.pipIrrSell.clientCard.qo.QoCards2;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.media.Content;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -37,7 +41,7 @@
     private final ClientCardSv clientCardSv;
 
     /**
-     * 鑾峰彇鎸囧畾鐢ㄦ埛鍚嶄笅鍏ㄩ儴姘村崱
+     * 鑾峰彇鎸囧畾鐢ㄦ埛鍚嶄笅鍏ㄩ儴姘村崱锛堢墿鐞嗗崱+铏氭嫙鍗★級
      * @param clientId
      * @return
      */
@@ -87,4 +91,105 @@
             return BaseResponseUtils.buildException(e.getMessage()) ;
         }
     }
+
+    /**
+     * 鏍规嵁姘村崱缂栧彿鑾峰彇鍗$墖鐘舵��
+     * @param cardNum
+     * @return
+     */
+    @Operation(summary = "鏍规嵁姘村崱缂栧彿鑾峰彇鍗$墖鐘舵��", description = "鏍规嵁姘村崱缂栧彿鑾峰彇鍗$墖鐘舵��")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "杩斿洖涓�椤靛啘鎴锋暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = BaClient.class))}
+            )
+    })
+    @GetMapping(path = "/cardstate")
+    @SsoAop()
+    public BaseResponse<String> getCardStateByCardNum(@RequestParam("cardNum") Long cardNum){
+        try {
+            String stateName = clientCardSv.getCardStateByCardNum(cardNum);
+            return BaseResponseUtils.buildSuccess(stateName);
+        } catch (Exception e) {
+            log.error("鏌ヨ鎿嶄綔璁板綍寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鏉′欢鑾峰彇姘村崱鍒楄〃锛屽簲鐢ㄧ▼搴忎娇鐢�
+     * @param vo
+     * @return
+     */
+    @Operation(summary = "鑾峰緱涓�椤垫按鍗¤褰�", description = "杩斿洖涓�椤垫按鍗℃暟鎹�")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "杩斿洖涓�椤靛啘鎴锋暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = BaClient.class))}
+            )
+    })
+    @GetMapping(path = "getcards")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoCards>>> getcards(QoCards vo){
+        try {
+            QueryResultVo<List<VoCards>> res = clientCardSv.getCards(vo);
+            return BaseResponseUtils.buildSuccess(res);
+        } catch (Exception e) {
+            log.error("鏌ヨ鍐滄埛寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鑾峰緱涓�椤靛凡鎸傚け锛屾湭琛ュ崱鐨勬按鍗¤褰�
+     * @param vo
+     * @return
+     */
+    @Operation(summary = "鑾峰緱涓�椤靛凡鎸傚け锛屾湭琛ュ崱鐨勬按鍗¤褰�", description = "杩斿洖涓�椤靛凡鎸傚け锛屾湭琛ュ崱鐨勬按鍗℃暟鎹�")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "杩斿洖涓�椤靛啘鎴锋暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = BaClient.class))}
+            )
+    })
+    @GetMapping(path = "getUnreplaced")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoCards>>> getUnreplaced(QoCards vo){
+        try {
+            QueryResultVo<List<VoCards>> res = clientCardSv.getUnreplaced(vo);
+            return BaseResponseUtils.buildSuccess(res);
+
+        } catch (Exception e) {
+            log.error("鏌ヨ鍐滄埛寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鏍规嵁鍐滄埛濮撳悕銆佺數璇濇煡璇㈡甯哥姸鎬佺殑姘村崱鍒楄〃
+     * @param vo
+     * @return
+     */
+    @GetMapping(path = "getCardsByClientNameAndPhone")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoCards2>>> getCardsByClientNameAndPhone(QoCards2 vo){
+        try {
+            QueryResultVo<List<VoCards2>> res = clientCardSv.getCardsByClientNameAndPhone(vo);
+            return BaseResponseUtils.buildSuccess(res);
+            //if(res.itemTotal != null && res.itemTotal > 0) {
+            //    return BaseResponseUtils.buildSuccess(res);
+            //}else {
+            //    return BaseResponseUtils.buildFail(SellResultCode.THE_CARD_NOT_EXIST.getMessage());
+            //}
+        } catch (Exception e) {
+            log.error("鏌ヨ姘村崱寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
 }

--
Gitblit v1.8.0