|
@@ -23,22 +23,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectSysMagnetLogList" parameterType="SysMagnetLog" resultMap="SysMagnetLogResult">
|
|
|
- <include refid="selectSysMagnetLogVo"/>
|
|
|
- <where>
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
- <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
- <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if>
|
|
|
- <if test="orgName != null and orgName != ''"> and org_name like concat('%', #{orgName}, '%')</if>
|
|
|
- <if test="level != null and level != ''"> and level = #{level}</if>
|
|
|
- <if test="magnetName != null and magnetName != ''"> and magnet_name like concat('%', #{magnetName}, '%')</if>
|
|
|
+ select a.id, a.user_id, a.user_name, b.org_code, b.org_name, b.sales_level level, a.magnet_name, a.create_by, a.create_time, a.update_by, a.update_time
|
|
|
+ from sys_magnet_log a left join sys_user_ext b on a.user_id=b.user_id
|
|
|
+ <where>
|
|
|
+ <if test="userId != null "> and a.user_id = #{userId}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and a.user_name like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="orgCode != null and orgCode != ''"> and b.org_code = #{orgCode}</if>
|
|
|
+ <if test="orgName != null and orgName != ''"> and b.org_name like concat('%', #{orgName}, '%')</if>
|
|
|
+ <if test="level != null and level != ''"> and b.sales_level = #{level}</if>
|
|
|
+ <if test="magnetName != null and magnetName != ''"> and a.magnet_name like concat('%', #{magnetName}, '%')</if>
|
|
|
<if test="params.beginTime != null and params.beginTime != ''">
|
|
|
- and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
+ and date_format(a.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
</if>
|
|
|
<if test="params.endTime != null and params.endTime != ''">
|
|
|
- and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
+ and date_format(a.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by create_time desc
|
|
|
+ order by a.create_time desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectSysMagnetLogById" parameterType="Long" resultMap="SysMagnetLogResult">
|