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/proLine/ProLineSv.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proLine/ProLineSv.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proLine/ProLineSv.java
index 1c95e56..156892f 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proLine/ProLineSv.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proLine/ProLineSv.java
@@ -24,9 +24,9 @@
}
@Transactional
- public int save(PltProductionLine line) throws Exception {
+ public int save(PltProductionLine line) throws RuntimeException {
if(dao.selectByNameId(line.id,line.name)>0){
- throw new Exception("鐢熶骇绾垮悕绉板凡瀛樺湪");
+ throw new RuntimeException("鐢熶骇绾垮悕绉板凡瀛樺湪");
}
int count = dao.insertSelective(line);
return count;
@@ -45,9 +45,9 @@
@Transactional
- public int update(PltProductionLine line) throws Exception {
+ public int update(PltProductionLine line) throws RuntimeException {
if(dao.selectByNameId(line.id,line.name)>0){
- throw new Exception("鐢熶骇绾垮悕绉板凡瀛樺湪");
+ throw new RuntimeException("鐢熶骇绾垮悕绉板凡瀛樺湪");
}
int count = dao.updateByPrimaryKeySelective(line);
return count;
@@ -76,5 +76,8 @@
return rsVo ;
}
+ public List<PltProductionLine> selectAll() {
+ return dao.selectAll();
+ }
}
--
Gitblit v1.8.0