From 9335bd3072534901b8bc45999656ad60420ba5e7 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 16 五月 2024 17:53:48 +0800
Subject: [PATCH] 完善代码
---
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java
index 57493fa..f534ddc 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java
@@ -6,6 +6,7 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.aop.Log;
+import com.dy.pmsGlobal.pojoBa.BaRole;
import com.dy.pmsGlobal.pojoPlt.PltProductParams;
import com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason;
import jakarta.validation.Valid;
@@ -46,6 +47,7 @@
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
reason.deleted = false;
+ reason.disabled = false;
return BaseResponseUtils.buildSuccess(sv.save(reason));
}catch (Exception e){
log.error("淇濆瓨浜у搧鐢熶骇涓嶅悎鏍煎師鍥犲紓甯�", e);
@@ -129,5 +131,22 @@
}
}
+ /**
+ * 绂佺敤鎴栧惎鐢�
+ * @param reason
+ * @return
+ */
+ @PostMapping(path="disabled")
+ @SsoPowerAop(power = "10100011")
+ @Log("绂佺敤鎴栧惎鐢ㄤ笉鍚堟牸鍘熷洜")
+ public BaseResponse<BaRole> disabled(@RequestBody PltProductUnqualifiedReason reason){
+ try {
+ return BaseResponseUtils.buildSuccess(sv.disabled(reason.id,reason.disabled));
+ }catch (Exception e){
+ log.error("绂佺敤鎴栧惎鐢ㄤ笉鍚堟牸鍘熷洜寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
}
--
Gitblit v1.8.0