2025-04-10 14:07:11 +08:00
|
|
|
<?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">
|
2025-05-16 00:07:59 +08:00
|
|
|
<mapper namespace="com.dite.znpt.mapper.UserMapper">
|
2025-04-10 14:07:11 +08:00
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
2025-05-16 00:07:59 +08:00
|
|
|
a.user_id, a.name, a.role_type, a.company_id,
|
2025-04-11 23:17:53 +08:00
|
|
|
a.password, a.status
|
2025-04-10 14:07:11 +08:00
|
|
|
</sql>
|
|
|
|
|
2025-05-16 00:07:59 +08:00
|
|
|
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.UserResp">
|
2025-05-19 00:02:33 +08:00
|
|
|
SELECT
|
|
|
|
u.user_id, u.account, u.avatar, u.status, u.name, u.identity_card, u.gender, u.mobile, u.email, u.hiredate, u.birthdate, u.education, major_field
|
|
|
|
FROM user u
|
2025-04-10 14:07:11 +08:00
|
|
|
<where>
|
2025-05-19 00:02:33 +08:00
|
|
|
<if test="account != null and account != ''">
|
|
|
|
AND a.account LIKE concat ('%', #{account}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
AND a.name LIKE concat ('%', #{name}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="mobile != null and mobile != ''">
|
|
|
|
AND a.mobile LIKE concat ('%', #{mobile}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="email != null and email != ''">
|
|
|
|
AND a.email LIKE concat ('%', #{email}, '%')
|
|
|
|
</if>
|
2025-04-11 23:17:53 +08:00
|
|
|
<if test="status != null">
|
2025-05-19 00:02:33 +08:00
|
|
|
AND a.status = #{status}
|
2025-04-11 23:17:53 +08:00
|
|
|
</if>
|
2025-04-10 14:07:11 +08:00
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
|