From e7821f087f3d1d39c945fb9772ca97f6ef24de95 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 19 七月 2024 11:41:47 +0800
Subject: [PATCH] 作物相关接口、作物灌溉制度相关接口、轮灌组相关接口、灌溉单元相关接口修改完善失败响应信息并配置相应枚举类
---
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 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 93901fd..a025279 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
@@ -8,7 +8,9 @@
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 com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
@@ -136,11 +138,7 @@
public BaseResponse<QueryResultVo<List<VoCards>>> getcards(QoCards vo){
try {
QueryResultVo<List<VoCards>> res = clientCardSv.getCards(vo);
- if(res.itemTotal != null && res.itemTotal > 0) {
- return BaseResponseUtils.buildSuccess(res);
- }else {
- return BaseResponseUtils.buildFail(SellResultCode.THE_CARD_NOT_EXIST.getMessage());
- }
+ return BaseResponseUtils.buildSuccess(res);
} catch (Exception e) {
log.error("鏌ヨ鍐滄埛寮傚父", e);
return BaseResponseUtils.buildException(e.getMessage()) ;
@@ -166,13 +164,31 @@
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);
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);
+ log.error("鏌ヨ姘村崱寮傚父", e);
return BaseResponseUtils.buildException(e.getMessage()) ;
}
}
--
Gitblit v1.8.0