39 lines
1.6 KiB
XML
39 lines
1.6 KiB
XML
|
<?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">
|
||
|
|
||
|
<select id="findJjrPage" 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 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.create_time >= #{params.startTime}
|
||
|
</if>
|
||
|
<if test="params.endTime!=null and params.endTime!=''">
|
||
|
and a.create_time <= #{params.endTime}
|
||
|
</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>
|