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.

83 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.msdw.tms.dao.UserDao">
<select id="queryUserInfo" resultType="hashMap">
SELECT
u.userId,
userName,
u.sex,
u.email,
u.phone,
u.account,
u.countries,
c.cityName,
u.dateBirth,
u.weChatID,
u.IDNumber,
u.documentType,
u.educationDegree,
pro.provinceName,
s.schoolName
FROM
hr_user_info u,
school s,
city c,
province pro
WHERE
u.provinceId = pro.provinceId
AND u.schoolId = s.schoolId
AND u.cityId = c.cityId
AND u.isdel = 0
AND u.provinceId = c.provinceId
AND u.userId = #{userid}
AND pro.isdel = 0
AND c.isdel = 0
AND s.isdel = 0
</select>
<select id="queryPersonalFile" parameterType="com.msdw.tms.entity.UserEntity" resultType="com.msdw.tms.entity.vo.UserEntityVo">
SELECT
per.schoolId AS personalSchoolId,
per.SchoolName AS personalSchoolName,
disciplineId,
disciplineName,
professionalClassId,
per.professionalClassName,
per.professionalId,
per.professionalName,
per.personalCareerId,
s.cityName AS personalCityName,
s.provinceName AS personalProvinceName
FROM
hr_personal_file per,
school s
WHERE
per.schoolId = s.schoolId
AND per.userId = #{userid}
AND s.isdel = 0
</select>
<update id="updateUserPersonal" parameterType="com.msdw.tms.entity.vo.UserProsonalEntityVo">
UPDATE
hr_personal_file per
SET
per.personalCareerId = #{personalCareerId},
per.schoolId = #{schoolId},
per.schoolName = #{schoolName},
per.disciplineId = #{disciplineId},
per.disciplineName = #{disciplineName},
per.professionalId = #{professionalId},
per.professionalName = #{professionalName},
per.professionalClassId = #{professionalClassId},
per.professionalClassName = #{professionalClassName},
per.updatetime = NOW()
WHERE
per.userId = #{userId}
AND
per.personalFileId = #{personalFileId}
</update>
</mapper>