policeSecurity/policeSecurityServer/src/main/resources/mapper/MiniProgramUserMapper.xml

26 lines
1.1 KiB
XML
Raw Normal View History

<?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.changhu.module.miniProgram.mapper.MiniProgramUserMapper">
<select id="pager" resultType="com.changhu.module.management.pojo.vo.UnitMiniProgramUserPagerVo">
select
mpu.*
from mini_program_user mpu
where
mpu.delete_flag = 0
and mpu.identity = #{identity.value}
and mpu.unit_id = ${@com.changhu.common.utils.UserUtil@getUnitId()}
<if test="params.name!=null and params.name!=''">
and mpu.name like concat('%',#{params.name},'%')
</if>
<if test="params.telephone!=null and params.telephone!=''">
and mpu.telephone like concat('%',#{params.telephone},'%')
</if>
<if test="params.sex!=null">
and mpu.sex = #{params.sex.value}
</if>
<if test="params.isEnable!=null">
and mpu.is_enable = #{params.isEnable.value}
</if>
order by mpu.create_time desc
</select>
</mapper>