From ec8f519a552206a22806aabdd36a102def1d35f9 Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期二, 23 七月 2024 09:19:00 +0800
Subject: [PATCH] id生成,sql优化
---
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java | 42 ++++++++++++++++++++----------------------
1 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
index 1c86b6f..5bcf5e9 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
@@ -6,10 +6,8 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.aop.Log;
-import com.dy.pmsGlobal.pojoPlt.PltProductTestItems;
+import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems;
import com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason;
-import com.dy.pmsPlatform.proTestItems.ProTestItemsSv;
-import com.dy.pmsPlatform.proTestItems.QueryVo;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -21,7 +19,7 @@
*/
@Slf4j
@RestController
-@RequestMapping(path="items")
+@RequestMapping(path="testItems")
@SuppressWarnings("unchecked")
public class ProTestItemsCtrl {
private ProTestItemsSv sv;
@@ -31,14 +29,14 @@
}
/**
- * 淇濆瓨浜у搧鍝佽川妫�鏌ラ」鐩�
+ * 淇濆瓨浜у搧娴嬭瘯妫�鏌ラ」鐩�
* @param item
* @return
*/
@PostMapping(path="save")
@SsoPowerAop(power = "10300003")
- @Log("淇濆瓨浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
- public BaseResponse<Boolean> save(@RequestBody @Valid PltProductTestItems item){
+ @Log("淇濆瓨浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
+ public BaseResponse<Boolean> save(@RequestBody @Valid PltProductTestInspectionItems item){
item.deleted = false;
item.disabled = false;
int count =sv.save(item);
@@ -51,14 +49,14 @@
/**
- * 鏇存柊浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�
+ * 鏇存柊浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�
* @param item
* @return
*/
@PostMapping(path="update")
@SsoPowerAop(power = "10300003")
- @Log("鏇存柊浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
- public BaseResponse<Boolean> update(@RequestBody @Valid PltProductTestItems item){
+ @Log("鏇存柊浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
+ public BaseResponse<Boolean> update(@RequestBody @Valid PltProductTestInspectionItems item){
int count = sv.update(item);
if (count <= 0) {
return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
@@ -68,13 +66,13 @@
}
/**
- * 鍒犻櫎浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�
+ * 鍒犻櫎浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�
* @param id
* @return
*/
@GetMapping(path="delete")
@SsoPowerAop(power = "10300003")
- @Log("鍒犻櫎浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
+ @Log("鍒犻櫎浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
public BaseResponse<Boolean> delete(String id){
int count = sv.delete(Long.parseLong(id));
@@ -88,27 +86,27 @@
/**
- * 鏍规嵁ID鏌ヨ浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�
+ * 鏍规嵁ID鏌ヨ浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�
* @return
*/
@GetMapping(path="one")
@SsoPowerAop(power = "10300002") //鐧诲綍涓庢潈闄愬悓鏃堕獙璇�
- @Log("鏍规嵁ID鏌ヨ浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
- public BaseResponse<PltProductTestItems> one(String id){
- PltProductTestItems item=sv.selectById(id);
+ @Log("鏍规嵁ID鏌ヨ浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
+ public BaseResponse<PltProductTestInspectionItems> one(String id){
+ PltProductTestInspectionItems item=sv.selectById(id);
return BaseResponseUtils.buildSuccess(JSON.toJSON(item));
}
/**
- * 鏌ヨ浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�
+ * 鏌ヨ浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�
* @param vo
* @return
*/
@PostMapping(path="some")
@SsoPowerAop(power = "10300002")
- @Log("鏌ヨ浜у搧鍝佽川妫�鏌ラ」鐩俊鎭�")
- public BaseResponse<QueryResultVo<List<PltProductTestItems>>> some(@RequestBody QueryVo vo){
- QueryResultVo<List<PltProductTestItems>> list = sv.selectSome(vo) ;
+ @Log("鏌ヨ浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
+ public BaseResponse<QueryResultVo<List<PltProductTestInspectionItems>>> some(@RequestBody QueryVo vo){
+ QueryResultVo<List<PltProductTestInspectionItems>> list = sv.selectSome(vo) ;
return BaseResponseUtils.buildSuccess(list);
}
/**
@@ -118,8 +116,8 @@
*/
@PostMapping(path="disabled")
@SsoPowerAop(power = "10100011")
- @Log("绂佺敤鎴栧惎鐢ㄨ川妫�椤圭洰")
- public BaseResponse<Boolean> disabled(@RequestBody PltProductUnqualifiedReason reason){
+ @Log("绂佺敤鎴栧惎鐢ㄦ祴璇曢」鐩�")
+ public BaseResponse<Boolean> disabled(@RequestBody PltProductTestInspectionItems reason){
int count = sv.disabled(reason.id,reason.disabled);
if (count <= 0) {
--
Gitblit v1.8.0