From a4636611b429e84fc6abef44dcd005cee69b1858 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期三, 11 九月 2024 15:35:43 +0800
Subject: [PATCH] 2024-09-11 朱宝民 获取图片验证码接口转移到App模块下
---
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java
index 4619a22..053f427 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java
@@ -67,12 +67,13 @@
@SsoAop()
public BaseResponse<QueryResultVo<List<VoDivide>>> getDivides(QueryVo vo){
try {
- QueryResultVo<List<VoDivide>> res = divideSv.getDivides(vo);
- if(res.itemTotal != null && res.itemTotal > 0) {
- return BaseResponseUtils.buildSuccess(res);
- }else {
- return BaseResponseUtils.buildSuccess(ProjectResultCode.NO_DIVIDES.getMessage());
- }
+ //QueryResultVo<List<VoDivide>> res = divideSv.getDivides(vo);
+ //if(res.itemTotal != null && res.itemTotal > 0) {
+ // return BaseResponseUtils.buildSuccess(res);
+ //}else {
+ // return BaseResponseUtils.buildSuccess(ProjectResultCode.NO_DIVIDES.getMessage());
+ //}
+ return BaseResponseUtils.buildSuccess(divideSv.getDivides(vo));
} catch (Exception e) {
log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e);
return BaseResponseUtils.buildException(e.getMessage()) ;
@@ -101,7 +102,7 @@
if(res != null) {
return BaseResponseUtils.buildSuccess(res);
}else {
- return BaseResponseUtils.buildFail(ProjectResultCode.NO_DIVIDES.getMessage());
+ return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_DIVIDES.getMessage());
}
} catch (Exception e) {
log.error("鏌ヨ鍐滄埛寮傚父", e);
@@ -129,7 +130,7 @@
@SsoAop()
public BaseResponse<Boolean> add(@RequestBody @Valid DtoDivide po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
// 鎺ユ敹鏉戠紪鍙凤紙涓婚敭锛�
Long villageId = po.getVillageId();
@@ -142,7 +143,7 @@
*/
Map map_districts = Optional.ofNullable(divideSv.getDistrictsByVillageId(villageId)).orElse(new HashMap());
if(map_districts.size() <= 0) {
- return BaseResponseUtils.buildFail("鍖哄垝淇℃伅鏈夎");
+ return BaseResponseUtils.buildErrorMsg("鍖哄垝淇℃伅鏈夎");
}
Long countryId = Long.parseLong(map_districts.get("countryId").toString());
Long townId = Long.parseLong(map_districts.get("townId").toString());
@@ -155,7 +156,7 @@
prDivide.setDeleted((byte)0);
Integer rec = Optional.ofNullable(divideSv.addDivide(prDivide)).orElse(0);
if(rec == 0) {
- return BaseResponseUtils.buildFail(ProjectResultCode.DIVIDE_FAIL.getMessage());
+ return BaseResponseUtils.buildErrorMsg(ProjectResultCode.DIVIDE_FAIL.getMessage());
}
return BaseResponseUtils.buildSuccess(true) ;
}
@@ -186,7 +187,7 @@
try {
Integer res = Optional.ofNullable(divideSv.deleteDivideById(id)).orElse(0);
if(res == 0)
- return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_DIVIDE_FAIL.getMessage());
+ return BaseResponseUtils.buildErrorMsg(ProjectResultCode.DELETE_DIVIDE_FAIL.getMessage());
return BaseResponseUtils.buildSuccess(true);
} catch (Exception e) {
@@ -215,7 +216,7 @@
@SsoAop()
public BaseResponse<Boolean> update(@RequestBody @Valid DtoDivide po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
// 鎺ユ敹鏉戠紪鍙凤紙涓婚敭锛�
@@ -229,7 +230,7 @@
*/
Map map_districts = Optional.ofNullable(divideSv.getDistrictsByVillageId(villageId)).orElse(new HashMap());
if(map_districts.size() <= 0) {
- return BaseResponseUtils.buildFail("鍖哄垝淇℃伅鏈夎");
+ return BaseResponseUtils.buildErrorMsg("鍖哄垝淇℃伅鏈夎");
}
Long countryId = Long.parseLong(map_districts.get("countryId").toString());
Long townId = Long.parseLong(map_districts.get("townId").toString());
@@ -242,7 +243,7 @@
Integer rec = Optional.ofNullable(divideSv.updateByPrimaryKey(prDivide)).orElse(0);
if(rec == 0) {
- return BaseResponseUtils.buildFail("鍒嗘按鎴夸慨鏀瑰け璐�");
+ return BaseResponseUtils.buildErrorMsg("鍒嗘按鎴夸慨鏀瑰け璐�");
}
return BaseResponseUtils.buildSuccess(true) ;
}
--
Gitblit v1.8.0