作者 唐俊升

update:

1. 用户列表新增根据更新时间查询,为查询时间以后数据。
@@ -29,6 +29,7 @@ import lombok.extern.slf4j.Slf4j; @@ -29,6 +29,7 @@ import lombok.extern.slf4j.Slf4j;
29 import org.apache.commons.lang.StringUtils; 29 import org.apache.commons.lang.StringUtils;
30 import org.springframework.beans.factory.annotation.Autowired; 30 import org.springframework.beans.factory.annotation.Autowired;
31 import org.springframework.context.annotation.Bean; 31 import org.springframework.context.annotation.Bean;
  32 +import org.springframework.format.annotation.DateTimeFormat;
32 import org.springframework.security.core.context.SecurityContextHolder; 33 import org.springframework.security.core.context.SecurityContextHolder;
33 import org.springframework.security.core.userdetails.UserDetails; 34 import org.springframework.security.core.userdetails.UserDetails;
34 import org.springframework.validation.BindingResult; 35 import org.springframework.validation.BindingResult;
@@ -43,6 +44,7 @@ import javax.servlet.http.HttpServletResponse; @@ -43,6 +44,7 @@ import javax.servlet.http.HttpServletResponse;
43 import javax.servlet.http.HttpSession; 44 import javax.servlet.http.HttpSession;
44 import java.awt.image.BufferedImage; 45 import java.awt.image.BufferedImage;
45 import java.io.IOException; 46 import java.io.IOException;
  47 +import java.util.Date;
46 import java.util.List; 48 import java.util.List;
47 import java.util.Map; 49 import java.util.Map;
48 import java.util.Properties; 50 import java.util.Properties;
@@ -73,6 +75,8 @@ public class UserController { @@ -73,6 +75,8 @@ public class UserController {
73 int pageSize, 75 int pageSize,
74 @RequestParam(value = "userName",required = false) String username, 76 @RequestParam(value = "userName",required = false) String username,
75 @RequestParam(value = "realName",required = false) String realname, 77 @RequestParam(value = "realName",required = false) String realname,
  78 + @RequestParam(value = "updatetime", required = false)
  79 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date updatetime,
76 @RequestParam(value = "online",required = false) Boolean online, 80 @RequestParam(value = "online",required = false) Boolean online,
77 @RequestParam(value = "loginFlag",required = false) String loginFlag) 81 @RequestParam(value = "loginFlag",required = false) String loginFlag)
78 { 82 {
@@ -81,6 +85,7 @@ public class UserController { @@ -81,6 +85,7 @@ public class UserController {
81 kakoUser.setLoginName(username); 85 kakoUser.setLoginName(username);
82 kakoUser.setName(realname); 86 kakoUser.setName(realname);
83 kakoUser.setOnline(online); 87 kakoUser.setOnline(online);
  88 + kakoUser.setUpdateDate(updatetime);
84 PageInfo<KakoUser> usersPageInfo = userService.selectAllUser(pageNum,pageSize, kakoUser); 89 PageInfo<KakoUser> usersPageInfo = userService.selectAllUser(pageNum,pageSize, kakoUser);
85 return new ResultJson("200","success",usersPageInfo); 90 return new ResultJson("200","success",usersPageInfo);
86 } 91 }
@@ -60,6 +60,9 @@ @@ -60,6 +60,9 @@
60 <if test="loginFlag != null" > 60 <if test="loginFlag != null" >
61 and login_flag = #{loginFlag,jdbcType=VARCHAR} 61 and login_flag = #{loginFlag,jdbcType=VARCHAR}
62 </if> 62 </if>
  63 + <if test="updateDate != null" >
  64 + and update_Date &gt; #{updateDate,jdbcType=TIMESTAMP}
  65 + </if>
63 </where> 66 </where>
64 </select> 67 </select>
65 <select id="selectByUsername" resultMap="BaseResultMap" parameterType="java.lang.String" > 68 <select id="selectByUsername" resultMap="BaseResultMap" parameterType="java.lang.String" >