You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.3 KiB
57 lines
2.3 KiB
<?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.daqing.financial.hrms.dao.UserDao"> |
|
|
|
<!-- 可根据自己的需求,是否要使用 --> |
|
<resultMap type="com.daqing.framework.domain.hrms.UserEntity" id="userMap"> |
|
<result property="id" column="id"/> |
|
<result property="account" column="account"/> |
|
<result property="phoneAccount" column="phone_account"/> |
|
<result property="password" column="password"/> |
|
<result property="loginNum" column="login_num"/> |
|
<result property="lasttime" column="lasttime"/> |
|
<result property="wechatId" column="wechat_id"/> |
|
<result property="status" column="status"/> |
|
<result property="disableStartTime" column="disable_start_time"/> |
|
<result property="disableEndTime" column="disable_end_time"/> |
|
<result property="disableCause" column="disable_cause"/> |
|
<result property="delOrNot" column="del_or_not"/> |
|
<result property="createTime" column="create_time"/> |
|
<result property="motifyTime" column="motify_time"/> |
|
</resultMap> |
|
|
|
<select id="getPasswordById" parameterType="long" resultType="string"> |
|
SELECT password FROM hrms_user WHERE del_or_not = 0 AND id = #{id} |
|
</select> |
|
|
|
<select id="getAccountById" parameterType="long" resultType="string"> |
|
SELECT account FROM hrms_user WHERE del_or_not = 0 AND id = #{id} |
|
</select> |
|
|
|
<update id="updatePassword"> |
|
UPDATE hrms_user SET password = #{password} WHERE id = #{id} |
|
</update> |
|
|
|
<select id="getPhoneAccount" parameterType="long" resultType="string"> |
|
SELECT phone_account FROM hrms_user WHERE del_or_not = 0 AND id = #{id} |
|
</select> |
|
|
|
<update id="updatePhoneAccount"> |
|
UPDATE hrms_user SET phone_account = #{phoneAccount} WHERE id = #{id} |
|
</update> |
|
|
|
<update id="updateWeChat"> |
|
UPDATE hrms_user SET wechat_id = #{weChatId} WHERE id = #{id} |
|
</update> |
|
|
|
<select id="getEmployeeIdByUserId" parameterType="long" resultType="long"> |
|
SELECT e.id id |
|
FROM hrms_employee e |
|
LEFT JOIN hrms_user u |
|
ON e.user_id = u.id |
|
WHERE del_or_not = 0 |
|
AND u.id = #{userId} |
|
</select> |
|
|
|
</mapper> |