From 49266bf7b1a94f69f4eee7951e747db0da9bb869 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期日, 12 十一月 2023 17:49:53 +0800
Subject: [PATCH] 完善Schema注解
---
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserSv.java | 39 +++++++++++++++++++++++++++++++++++----
1 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserSv.java
index 3bb6d37..5a9b75e 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserSv.java
@@ -3,17 +3,17 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoBa.BaUserMapper;
-import com.dy.pipIrrGlobal.pojoBa.BaBlock;
+import com.dy.pipIrrGlobal.pojoBa.BaDistrict;
import com.dy.pipIrrGlobal.pojoBa.BaUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.dubbo.common.utils.PojoUtils ;
+import org.springframework.transaction.annotation.Transactional;
@Slf4j
@Service
@@ -46,12 +46,43 @@
Map<String, Object> params = (Map<String, Object>)PojoUtils.generalize(vo) ;
Long itemTotal = this.dao.selectTotal(params) ;
- QueryResultVo<List<BaBlock>> rsVo = new QueryResultVo<>() ;
+ QueryResultVo<List<BaUser>> rsVo = new QueryResultVo<>() ;
rsVo.pageSize = vo.pageSize ;
rsVo.pageCurr = vo.pageCurr ;
rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = this.dao.selectSome(params) ;
- return (QueryResultVo.<List<BaUser>>builder().content(this.dao.selectSome(params))).build() ;
+ return rsVo ;
+ }
+
+ /**
+ * 淇濆瓨瀹炰綋
+ * @param po 瀹炰綋
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int save(BaUser po){
+ return this.dao.insert(po) ;
+ }
+
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param po 瀹炰綋
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int update(BaUser po){
+ return this.dao.updateByPrimaryKeySelective(po) ;
+ }
+
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param id 瀹炰綋ID
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int delete(Long id){
+ return this.dao.deleteLogicById(id) ;
}
}
--
Gitblit v1.8.0