rtos-mini-service4/mapper/target/classes/mappers/admin/UsersAdminMapper.xml

41 lines
1.5 KiB
XML
Raw Normal View History

2024-06-13 15:27:54 +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">
<mapper namespace="com.haitongauto.mapper.admin.UsersAdminMapper">
<!--根据用户ID、手机号、昵称、注册时间和用户状态查询小程序注册用户信息: keywords, registerDate,usersState-->
<select id="usersListForCondition" resultType="com.haitongauto.models.pojo.Users">
select
id,
access_token,
access_token_rtos,
users_name,
wx_openid,
wx_unionid,
wx_nick,
wx_sex,
wx_head_sculpture,
tel_number,
id_code,
users_state,
create_time,
update_time,
is_del
from applet_users
where is_del=0
<if test="keywords!=null and keywords!=''" >
and (id_code like concat('%',#{keywords},'%') or tel_number like concat('%',#{keywords},'%') or wx_nick like concat('%',#{keywords},'%') or users_name like concat('%',#{keywords},'%'))
</if>
<if test="registerDateStart!=null and registerDateStart!=''">
and to_char(create_time,'yyyy-mm-dd')&gt;=#{registerDateStart}
</if>
<if test="registerDateEnd!=null and registerDateEnd!=''">
and to_char(create_time,'yyyy-mm-dd')&lt;=#{registerDateEnd}
</if>
2024-08-06 13:54:28 +08:00
<if test="usersState!=null">
2024-06-13 15:27:54 +08:00
and users_state=#{usersState}
</if>
order by create_time desc
</select>
</mapper>