From 182c1cde1f4507d12eb4b6b1a4ffd24a2be6c93b Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期三, 10 七月 2024 11:48:40 +0800 Subject: [PATCH] 初始化缓存 --- src/main/resources/mapper/UserMapper.xml | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml index ca8edcc..aafbe1f 100644 --- a/src/main/resources/mapper/UserMapper.xml +++ b/src/main/resources/mapper/UserMapper.xml @@ -20,11 +20,14 @@ <result column="last_active_time" jdbcType="TIMESTAMP" property="lastActiveTime"/> <result column="deleted" jdbcType="BIT" property="deleted"/> <result column="wx_open_id" jdbcType="VARCHAR" property="wxOpenId"/> + <result column="need_update_password" property="needUpdatePassword" typeHandler="com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler"/> + <result column="last_update_password_time" property="lastUpdatePasswordTime"/> </resultMap> <sql id="Base_Column_List"> id , user_uuid, user_name, password, real_name, age, sex, birth_day, user_level, phone, - role, status, image_path, create_time, modify_time, last_active_time, deleted, wx_open_id + role, status, image_path, create_time, modify_time, last_active_time, deleted, wx_open_id, + need_update_password, last_update_password_time </sql> @@ -194,5 +197,26 @@ limit 1 </select> + <select id="classesStudent" resultType="com.ycl.jxkg.domain.vo.StudentVO"> + SELECT tu.id, + tu.real_name, + tu.phone + FROM t_user tu + INNER JOIN t_classes_user tcu ON tu.id = tcu.user_id + WHERE tcu.classes_id = #{classesId} + and tcu.deleted = 0 + ORDER BY tcu.create_time + </select> + + <update id="updatePasswordExpire"> + UPDATE + t_user + SET + need_update_password = 1,last_update_password_time = #{now} + WHERE + last_update_password_time IS NOT NULL + AND + DATEDIFF(#{now}, last_update_password_time) > #{expireDay} + </update> </mapper> -- Gitblit v1.8.0