|
|
@@ -16,7 +16,7 @@ public interface UserMapper {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select id,user_id_code,user_code,user_name,password,id_card,create_time,create_user,update_time,update_user,status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image from t_user where status !=2 ")
|
|
|
+ @Select("select id,user_id_code,user_code,user_name,id_card,create_time,create_user,update_time,update_user,status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image from t_user where status !=2 ")
|
|
|
List<User> selectAllUser();
|
|
|
|
|
|
/**
|
|
|
@@ -25,7 +25,7 @@ public interface UserMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select id,user_id_code,user_code,user_name,password,id_card,create_time,create_user,update_time,update_user," +
|
|
|
+ "select id,user_id_code,user_code,user_name,id_card,create_time,create_user,update_time,update_user," +
|
|
|
"status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image FROM t_user WHERE 1 = 1 " +
|
|
|
"<when test='id != null'>" +
|
|
|
" and id = #{id}" +
|
|
|
@@ -37,7 +37,8 @@ public interface UserMapper {
|
|
|
" and user_code = #{userCode}" +
|
|
|
"</when>"+
|
|
|
"<when test='userName != null'>" +
|
|
|
- " and user_name like '%${userName}%'" +
|
|
|
+ " <bind name=\"pattenName\" value=\"userName+'%'\" />"+
|
|
|
+ " and user_name like #{pattenName}" +
|
|
|
"</when>" +
|
|
|
" ORDER BY ID desc limit #{offset},#{pageSize} ",
|
|
|
"</script>"})
|
|
|
@@ -72,7 +73,7 @@ public interface UserMapper {
|
|
|
* @param id 主键
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select id,user_id_code,user_code,user_name,password,id_card,create_time,create_user,update_time,update_user,status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image from t_user where id=#{id}")
|
|
|
+ @Select("select id,user_id_code,user_code,user_name,id_card,create_time,create_user,update_time,update_user,status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image from t_user where id=#{id}")
|
|
|
User selectUserById(@Param("id") Long id);
|
|
|
|
|
|
/**
|
|
|
@@ -81,7 +82,7 @@ public interface UserMapper {
|
|
|
* @param userCode 工号
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select id,user_id_code,user_code,user_name,password,id_card,create_time,create_user,update_time,update_user,status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image from t_user where user_code=#{userCode}")
|
|
|
+ @Select("select id,user_id_code,user_code,user_name,id_card,create_time,create_user,update_time,update_user,status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image from t_user where user_code=#{userCode}")
|
|
|
User selectUserByCode(@Param("userCode") String userCode);
|
|
|
|
|
|
/**
|
|
|
@@ -90,7 +91,7 @@ public interface UserMapper {
|
|
|
* @param user
|
|
|
* @return
|
|
|
*/
|
|
|
- @Insert("INSERT INTO t_user(user_id_code,user_code, user_name, password, id_card, create_time, create_user, update_time, update_user, status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image) VALUES " +
|
|
|
+ @Insert("INSERT INTO t_user(user_id_code,user_code, user_name, id_card, create_time, create_user, update_time, update_user, status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image) VALUES " +
|
|
|
"(#{userIdCode,jdbcType=VARCHAR},#{userCode,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}," +
|
|
|
" #{createUser,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=BIGINT}, #{status,jdbcType=INTEGER},#{profileImage,jdbcType=BIGINT}" +
|
|
|
",#{email,jdbcType=VARCHAR},#{phoneNumber,jdbcType=VARCHAR},#{gender,jdbcType=CHAR},#{lockScreenPassword,jdbcType=VARCHAR},#{clientProfileImage,jdbcType=BIGINT})")
|
|
|
@@ -165,8 +166,10 @@ public interface UserMapper {
|
|
|
* @param userIdCode 员工编码
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select id,user_id_code,user_code,user_name,password,id_card,create_time,create_user,update_time,update_user,status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image from t_user where user_id_code=#{userIdCode}")
|
|
|
+ @Select("select id,user_id_code,user_code,user_name,id_card,create_time,create_user,update_time,update_user,status,profile_image,email,phone_number,gender,lock_screen_password,client_profile_image from t_user where user_id_code=#{userIdCode}")
|
|
|
User selectUserByUserIdCode(@Param("userIdCode") String userIdCode);
|
|
|
@Update(" update t_user set password =#{password} where user_code = #{userCode} ")
|
|
|
int updatePasswordByUserCode(User user);
|
|
|
+ @Select("select password from t_user where user_code=#{userCode}")
|
|
|
+ String selectPassword(String userCode);
|
|
|
}
|