Commit 1e48147e authored by 罗林杰's avatar 罗林杰

修改点击量时间搜索

parent 61b02027
...@@ -65,5 +65,11 @@ public class MemTraffic extends CyIdNotDataEntity<MemTraffic> { ...@@ -65,5 +65,11 @@ public class MemTraffic extends CyIdNotDataEntity<MemTraffic> {
@TableField(exist = false) @TableField(exist = false)
private String endTime; private String endTime;
/**
* 用户名称
*/
@TableField(exist = false)
private String nickName;
} }
...@@ -23,14 +23,26 @@ ...@@ -23,14 +23,26 @@
</select> </select>
<select id="queryMemTrafficsPaged" resultMap="BaseResultMap"> <select id="queryMemTrafficsPaged" resultMap="BaseResultMap">
select * from mem_traffic select * ,
su.nick_name as nickName
from mem_traffic mt
left join sys_user su on mt.user_id = su.business_id
where 1=1 where 1=1
<if test="entity.nickName !=null and entity.nickName != '' ">
and su.nick_name like concat('%',#{entity.nickName},'%')
</if>
<if test="entity.beginTime !=null and entity.beginTime != '' ">
and mt.create_date &gt;= #{entity.beginTime}
</if>
<if test="entity.endTime !=null and entity.endTime != '' ">
and mt.create_date &lt; date_add(#{entity.endTime}, INTERVAL 1 DAY)
</if>
<if test="entity.userId !=null and entity.userId != '' "> <if test="entity.userId !=null and entity.userId != '' ">
and user_id = #{entity.userId} and mt.user_id = #{entity.userId}
</if> </if>
<if test="entity.memTraffic !=null and entity.memTraffic != '' "> <if test="entity.memTraffic !=null and entity.memTraffic != '' ">
and mem_traffic = #{entity.memTraffic} and mem_traffic = #{entity.memTraffic}
</if> </if>
ORDER BY business_id DESC ORDER BY mt.business_id DESC
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment