update cms-service
This commit is contained in:
parent
bbade2d285
commit
d3795b45cb
|
@ -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
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zheng.mapper.UserVOMapper">
|
||||
<mapper namespace="com.zheng.cms.mapper.UserVOMapper">
|
||||
|
||||
<!-- 缓存 -->
|
||||
<!--<cache type="PERPETUAL" eviction="LRU" flushInterval="60000" size="1024" readOnly="true"/>-->
|
|
@ -1,4 +1,4 @@
|
|||
package com.zheng.model;
|
||||
package com.zheng.cms.model;
|
||||
|
||||
import java.awt.print.Book;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.zheng.service;
|
||||
package com.zheng.cms.service;
|
||||
|
||||
/**
|
||||
* baseService接口
|
|
@ -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接口
|
|
@ -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实现
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue