|
|
|
<?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.msdw.tms.dao.UserInfoDao">
|
|
|
|
|
|
|
|
<insert id="add" useGeneratedKeys="true" keyProperty="userId">
|
|
|
|
insert into hr_user_info(
|
|
|
|
userName, uniqueIdentificationAccount, provinceId,
|
|
|
|
cityId, schoolId, phone,account,password,roleId)
|
|
|
|
values(
|
|
|
|
#{userName}, #{uniqueIdentificationAccount}, #{provinceId},
|
|
|
|
#{cityId}, #{schoolId},#{phone}, #{account},#{password},#{roleId})
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="userInfupdateUserInfoById" parameterType="com.msdw.tms.entity.UserInfoEntity">
|
|
|
|
update hr_user_info
|
|
|
|
<set>
|
|
|
|
<if test="account!= null and account != '' ">
|
|
|
|
account = #{account},
|
|
|
|
</if>
|
|
|
|
<if test="countries!= null and countries != '' ">
|
|
|
|
countries = #{countries},
|
|
|
|
</if>
|
|
|
|
<if test="cityId!= null">
|
|
|
|
cityId = #{cityId},
|
|
|
|
</if>
|
|
|
|
<if test="dateBirth != null">
|
|
|
|
dateBirth = #{dateBirth},
|
|
|
|
</if>
|
|
|
|
<if test="documenttype != null">
|
|
|
|
documenttype = #{documenttype},
|
|
|
|
</if>
|
|
|
|
<if test="educationDegree != null">
|
|
|
|
educationDegree = #{educationDegree},
|
|
|
|
</if>
|
|
|
|
<if test="idNumber != null">
|
|
|
|
IDNumber = #{idNumber},
|
|
|
|
</if>
|
|
|
|
<if test="provinceId != null">
|
|
|
|
provinceId = #{provinceId},
|
|
|
|
</if>
|
|
|
|
<if test="sex != null">
|
|
|
|
sex = #{sex},
|
|
|
|
</if>
|
|
|
|
<if test="userName != null">
|
|
|
|
userName = #{userName},
|
|
|
|
</if>
|
|
|
|
<if test="schoolId != null">
|
|
|
|
schoolId = #{schoolId},
|
|
|
|
</if>
|
|
|
|
<if test="phone !=null">
|
|
|
|
phone #{phone}
|
|
|
|
</if>>
|
|
|
|
</set>
|
|
|
|
WHERE userId = #{userId};
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<select id="queryUserPassword" resultType="string">
|
|
|
|
SELECT `password` FROM hr_user_info WHERE userId = #{userId}
|
|
|
|
</select>
|
|
|
|
</mapper>
|