2024-08-05 10:18:01 +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.sqx.modules.bl.commission.jjr.dao.JjrDataDao">
|
|
|
|
|
2024-08-05 14:42:56 +08:00
|
|
|
<select id="findPage" resultType="com.sqx.modules.bl.commission.jjr.entity.JjrData">
|
|
|
|
select a.id,a.user_id,b.avatar,b.user_name,a.name,a.phone,a.remarks,a.create_time,a.status,a.opinion,b.invitation_code,a.approve_time
|
|
|
|
|
|
|
|
from bl_jjr_apply a
|
|
|
|
inner join tb_user b on a.user_id = b.user_id
|
|
|
|
where a.status= 1
|
|
|
|
<if test="params.name!=null and params.name!=''">
|
|
|
|
and a.name like concat('%',#{params.name},'%')
|
|
|
|
</if>
|
|
|
|
<if test="params.phone!=null and params.phone!=''">
|
|
|
|
and a.phone like concat('%',#{params.phone},'%')
|
|
|
|
</if>
|
|
|
|
<if test="params.startTime!=null and params.startTime!=''">
|
|
|
|
and a.approve_time >= #{params.startTime}
|
|
|
|
</if>
|
|
|
|
<if test="params.endTime!=null and params.endTime!=''">
|
|
|
|
and a.approve_time <= #{params.endTime}
|
|
|
|
</if>
|
|
|
|
order by id desc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="invitationArtificerPage" resultType="com.sqx.modules.bl.commission.jjr.entity.JjrData">
|
|
|
|
select a.user_id,a.artificer_img as avatar,a.artificer_name as name,a.phone,b.invitation_code
|
|
|
|
from artificer a
|
|
|
|
inner join tb_user b on a.user_id = b.user_id
|
|
|
|
where b.bl_jjr_code= #{invitationCode}
|
|
|
|
<if test="params.name!=null and params.name!=''">
|
|
|
|
and a.artificer_name like concat('%',#{params.name},'%')
|
|
|
|
</if>
|
|
|
|
<if test="params.phone!=null and params.phone!=''">
|
|
|
|
and a.phone like concat('%',#{params.phone},'%')
|
|
|
|
</if>
|
|
|
|
order by id desc
|
|
|
|
</select>
|
|
|
|
|
2024-08-05 10:18:01 +08:00
|
|
|
<select id="findJjrPage" resultType="com.sqx.modules.bl.commission.jjr.entity.JjrData">
|
2024-08-05 14:42:56 +08:00
|
|
|
select a.id,a.user_id,b.avatar,b.user_name,a.name,a.phone,a.remarks,a.create_time,a.status,a.opinion,b.invitation_code,a.approve_time
|
2024-08-05 10:18:01 +08:00
|
|
|
from bl_jjr_apply a
|
|
|
|
inner join tb_user b on a.user_id = b.user_id
|
|
|
|
where a.status= 1
|
|
|
|
<if test="params.name!=null and params.name!=''">
|
|
|
|
and a.name like concat('%',#{params.name},'%')
|
|
|
|
</if>
|
|
|
|
<if test="params.phone!=null and params.phone!=''">
|
|
|
|
and a.phone like concat('%',#{params.phone},'%')
|
|
|
|
</if>
|
|
|
|
<if test="params.startTime!=null and params.startTime!=''">
|
2024-08-05 14:42:56 +08:00
|
|
|
and a.approve_time >= #{params.startTime}
|
2024-08-05 10:18:01 +08:00
|
|
|
</if>
|
|
|
|
<if test="params.endTime!=null and params.endTime!=''">
|
2024-08-05 14:42:56 +08:00
|
|
|
and a.approve_time <= #{params.endTime}
|
2024-08-05 10:18:01 +08:00
|
|
|
</if>
|
|
|
|
order by id desc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getByCode" resultType="com.sqx.modules.bl.commission.jjr.entity.JjrData">
|
|
|
|
select a.id,a.user_id,b.avatar,b.user_name,a.name,a.phone,a.remarks,a.create_time,a.status,a.opinion
|
|
|
|
from bl_jjr_apply a
|
|
|
|
inner join tb_user b on a.user_id = b.user_id
|
|
|
|
where b.invitation_code= #{invitationCode}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<update id="modifyJjr" parameterType="com.sqx.modules.bl.commission.jjr.entity.JjrApply">
|
|
|
|
update tb_user
|
|
|
|
set bl_jjr_code=#{invitationCode}
|
|
|
|
where user_id=#{artificerUserId}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
</mapper>
|