From d3795b45cb6f7c1e7bd01727d50d76cce6ce5682 Mon Sep 17 00:00:00 2001 From: shuzheng <469741414@qq.com> Date: Wed, 5 Oct 2016 19:34:22 +0800 Subject: [PATCH] update cms-service --- .../com/zheng/{ => cms}/mapper/UserVOMapper.java | 6 +++--- .../java/com/zheng/{ => cms}/mapper/UserVOMapper.xml | 2 +- .../main/java/com/zheng/{ => cms}/model/UserVO.java | 2 +- .../com/zheng/{ => cms}/service/BaseService.java | 2 +- .../com/zheng/{ => cms}/service/UserService.java | 9 +++++---- .../{ => cms}/service/impl/UserServiceImpl.java | 12 ++++++------ .../com/zheng/{ => cms}/service/UserServiceTest.java | 12 ++++++------ 7 files changed, 23 insertions(+), 22 deletions(-) rename cms/cms-service/src/main/java/com/zheng/{ => cms}/mapper/UserVOMapper.java (78%) rename cms/cms-service/src/main/java/com/zheng/{ => cms}/mapper/UserVOMapper.xml (97%) rename cms/cms-service/src/main/java/com/zheng/{ => cms}/model/UserVO.java (91%) rename cms/cms-service/src/main/java/com/zheng/{ => cms}/service/BaseService.java (86%) rename cms/cms-service/src/main/java/com/zheng/{ => cms}/service/UserService.java (74%) rename cms/cms-service/src/main/java/com/zheng/{ => cms}/service/impl/UserServiceImpl.java (82%) rename cms/cms-service/src/test/java/com/zheng/{ => cms}/service/UserServiceTest.java (79%) diff --git a/cms/cms-service/src/main/java/com/zheng/mapper/UserVOMapper.java b/cms/cms-service/src/main/java/com/zheng/cms/mapper/UserVOMapper.java similarity index 78% rename from cms/cms-service/src/main/java/com/zheng/mapper/UserVOMapper.java rename to cms/cms-service/src/main/java/com/zheng/cms/mapper/UserVOMapper.java index 32588257..1064a147 100644 --- a/cms/cms-service/src/main/java/com/zheng/mapper/UserVOMapper.java +++ b/cms/cms-service/src/main/java/com/zheng/cms/mapper/UserVOMapper.java @@ -1,12 +1,12 @@ -package com.zheng.mapper; +package com.zheng.cms.mapper; import java.util.List; import java.util.Map; +import com.zheng.cms.model.User; import org.springframework.stereotype.Repository; -import com.zheng.model.User; -import com.zheng.model.UserVO; +import com.zheng.cms.model.UserVO; /** * 用户mapper diff --git a/cms/cms-service/src/main/java/com/zheng/mapper/UserVOMapper.xml b/cms/cms-service/src/main/java/com/zheng/cms/mapper/UserVOMapper.xml similarity index 97% rename from cms/cms-service/src/main/java/com/zheng/mapper/UserVOMapper.xml rename to cms/cms-service/src/main/java/com/zheng/cms/mapper/UserVOMapper.xml index b4c6104f..e4504c5f 100644 --- a/cms/cms-service/src/main/java/com/zheng/mapper/UserVOMapper.xml +++ b/cms/cms-service/src/main/java/com/zheng/cms/mapper/UserVOMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/cms/cms-service/src/main/java/com/zheng/model/UserVO.java b/cms/cms-service/src/main/java/com/zheng/cms/model/UserVO.java similarity index 91% rename from cms/cms-service/src/main/java/com/zheng/model/UserVO.java rename to cms/cms-service/src/main/java/com/zheng/cms/model/UserVO.java index 91a18885..4c5c29dc 100644 --- a/cms/cms-service/src/main/java/com/zheng/model/UserVO.java +++ b/cms/cms-service/src/main/java/com/zheng/cms/model/UserVO.java @@ -1,4 +1,4 @@ -package com.zheng.model; +package com.zheng.cms.model; import java.awt.print.Book; import java.util.List; diff --git a/cms/cms-service/src/main/java/com/zheng/service/BaseService.java b/cms/cms-service/src/main/java/com/zheng/cms/service/BaseService.java similarity index 86% rename from cms/cms-service/src/main/java/com/zheng/service/BaseService.java rename to cms/cms-service/src/main/java/com/zheng/cms/service/BaseService.java index c9cc16be..814e7e8a 100644 --- a/cms/cms-service/src/main/java/com/zheng/service/BaseService.java +++ b/cms/cms-service/src/main/java/com/zheng/cms/service/BaseService.java @@ -1,4 +1,4 @@ -package com.zheng.service; +package com.zheng.cms.service; /** * baseService接口 diff --git a/cms/cms-service/src/main/java/com/zheng/service/UserService.java b/cms/cms-service/src/main/java/com/zheng/cms/service/UserService.java similarity index 74% rename from cms/cms-service/src/main/java/com/zheng/service/UserService.java rename to cms/cms-service/src/main/java/com/zheng/cms/service/UserService.java index ff7284e9..32f8d45a 100644 --- a/cms/cms-service/src/main/java/com/zheng/service/UserService.java +++ b/cms/cms-service/src/main/java/com/zheng/cms/service/UserService.java @@ -1,11 +1,12 @@ -package com.zheng.service; +package com.zheng.cms.service; import java.util.List; import java.util.Map; -import com.zheng.mapper.UserMapper; -import com.zheng.model.User; -import com.zheng.model.UserVO; +import com.zheng.cms.mapper.UserMapper; +import com.zheng.cms.model.User; +import com.zheng.cms.model.UserVO; +import com.zheng.cms.service.BaseService; /** * 用户service接口 diff --git a/cms/cms-service/src/main/java/com/zheng/service/impl/UserServiceImpl.java b/cms/cms-service/src/main/java/com/zheng/cms/service/impl/UserServiceImpl.java similarity index 82% rename from cms/cms-service/src/main/java/com/zheng/service/impl/UserServiceImpl.java rename to cms/cms-service/src/main/java/com/zheng/cms/service/impl/UserServiceImpl.java index 9d7f849e..a91dd533 100644 --- a/cms/cms-service/src/main/java/com/zheng/service/impl/UserServiceImpl.java +++ b/cms/cms-service/src/main/java/com/zheng/cms/service/impl/UserServiceImpl.java @@ -1,17 +1,17 @@ -package com.zheng.service.impl; +package com.zheng.cms.service.impl; import java.util.List; import java.util.Map; +import com.zheng.cms.mapper.UserMapper; +import com.zheng.cms.model.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import com.zheng.mapper.UserMapper; -import com.zheng.mapper.UserVOMapper; -import com.zheng.model.User; -import com.zheng.model.UserVO; -import com.zheng.service.UserService; +import com.zheng.cms.mapper.UserVOMapper; +import com.zheng.cms.model.UserVO; +import com.zheng.cms.service.UserService; /** * 用户service实现 diff --git a/cms/cms-service/src/test/java/com/zheng/service/UserServiceTest.java b/cms/cms-service/src/test/java/com/zheng/cms/service/UserServiceTest.java similarity index 79% rename from cms/cms-service/src/test/java/com/zheng/service/UserServiceTest.java rename to cms/cms-service/src/test/java/com/zheng/cms/service/UserServiceTest.java index 67426cfc..78ca9fec 100644 --- a/cms/cms-service/src/test/java/com/zheng/service/UserServiceTest.java +++ b/cms/cms-service/src/test/java/com/zheng/cms/service/UserServiceTest.java @@ -1,5 +1,7 @@ -package com.zheng.service; +package com.zheng.cms.service; +import com.zheng.cms.model.User; +import com.zheng.cms.service.UserService; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -7,9 +9,7 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.TransactionConfiguration; -import com.zheng.mapper.UserMapper; -import com.zheng.model.User; -import com.zheng.model.UserVO; +import com.zheng.cms.model.UserVO; /** * 测试service @@ -33,8 +33,8 @@ public class UserServiceTest { UserVO userVO = userService.selectUserWithBook(1); System.out.println(userVO.getBooks().size()); // 自动生成接口调用 - User user2 = userService.getMapper().selectByPrimaryKey(1); - System.out.println(user2.getNickname()); + User user = userService.getMapper().selectByPrimaryKey(1); + System.out.println(user.getNickname()); } }