From f4a0f2acc63d7785eab108419a4e16f5f688cb95 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 18 一月 2020 12:06:27 +0800
Subject: [PATCH] 用户注册信息

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialPlaceImpl.java |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialPlaceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialPlaceImpl.java
index cde7334..ff407d4 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialPlaceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialPlaceImpl.java
@@ -4,14 +4,13 @@
 import java.util.List;
 
 import javax.annotation.Resource;
-import javax.transaction.Transactional;
 
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import com.yeshi.fanli.dao.mybatis.homemodule.SpecialPlaceMapper;
 import com.yeshi.fanli.entity.bus.homemodule.SpecialPlace;
-import com.yeshi.fanli.exception.FloatADException;
-import com.yeshi.fanli.exception.SpecialPlaceException;
+import com.yeshi.fanli.exception.homemodule.SpecialPlaceException;
 import com.yeshi.fanli.service.inter.homemodule.SpecialPlaceService;
 
 @Service
@@ -22,21 +21,26 @@
 	
 	
 	@Override
+	public SpecialPlace selectByPrimaryKey(Long id) {
+		return specialPlaceMapper.selectByPrimaryKey(id);
+	}
+	
+	
+	@Override
 	public void saveObject(SpecialPlace record) throws SpecialPlaceException, Exception{
 		
-		String placeName = record.getPlaceName();
+		String placeName = record.getName();
 		if (placeName == null || placeName.trim().length() == 0) {
-			throw new FloatADException(1, "浣嶇疆鍚嶇О涓嶈兘涓虹┖");
+			throw new SpecialPlaceException(1, "浣嶇疆鍚嶇О涓嶈兘涓虹┖");
 		}
 		
 		String key = record.getKey();
 		if (key == null || key.trim().length() == 0) {
-			throw new FloatADException(1, "浣嶇疆鏍囪瘑涓嶈兘涓虹┖");
+			throw new SpecialPlaceException(1, "浣嶇疆鏍囪瘑涓嶈兘涓虹┖");
 		}
 		
 		Long id = record.getId();
 		if (id == null) {
-			
 			record.setCreateTime(new Date());
 			record.setUpdateTime(new Date());
 			specialPlaceMapper.insert(record);
@@ -44,9 +48,9 @@
 			// 淇敼
 			SpecialPlace resultObj = specialPlaceMapper.selectByPrimaryKey(id);
 			if (resultObj == null) {
-				throw new FloatADException(1, "淇敼鍐呭宸蹭笉瀛樺湪");
+				throw new SpecialPlaceException(1, "淇敼鍐呭宸蹭笉瀛樺湪");
 			}
-			
+
 			record.setCreateTime(resultObj.getCreateTime());
 			record.setUpdateTime(new Date());
 			specialPlaceMapper.updateByPrimaryKey(record);
@@ -55,7 +59,7 @@
 	
 
 	@Override
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	public int deleteByPrimaryKeyList(List<Long> list) throws Exception{
 		return specialPlaceMapper.deleteByPrimaryKeyList(list);
 	}
@@ -74,8 +78,8 @@
 	}
 
 	@Override
-	public List<SpecialPlace> getList() {
-		return specialPlaceMapper.getList();
+	public List<SpecialPlace> getEffectiveList() {
+		return specialPlaceMapper.getAll();
 	}
 	
 }

--
Gitblit v1.8.0