Commit 5f971663 by 阳浪

sort排序

parent 06ccff45
package com.yizhi.site.application.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.yizhi.application.orm.id.IdGenerator;
import com.yizhi.core.application.context.ContextHolder;
......@@ -88,6 +89,16 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
eventTrack.setType(Integer.valueOf(dictionary.getDescription()));
}
}
if(Objects.equals(type,"event_login")){
EntityWrapper<EventTrack> wrapper = new EntityWrapper<EventTrack>();
wrapper.eq("business_id",userId);
wrapper.eq("type",eventTrack.getType());
wrapper.between("create_time", DateUtil.parse(DateUtil.toDay(toDay),"yyyy-MM-dd"),toDay);
EventTrack track = this.selectOne(wrapper);
if(track!=null&&track.getId()!=null){
return;
}
}
eventTrack.setId(idGenerator.generate());
this.insert(eventTrack);
}
......
......@@ -58,6 +58,9 @@
<if test="isTop != null">
and a.is_top = #{isTop}
</if>
<if test="state != null">
and a.state = #{state}
</if>
order by a.is_top desc, a.update_time desc
</select>
......@@ -80,6 +83,9 @@
<if test="isTop != null">
and a.is_top = #{isTop}
</if>
<if test="state != null">
and a.state = #{state}
</if>
order by a.is_top desc, a.update_time desc
</select>
......@@ -102,6 +108,9 @@
<if test="isTop != null">
and a.is_top = #{isTop}
</if>
<if test="state != null">
and a.state = #{state}
</if>
order by a.is_top desc, a.update_time desc
</select>
......@@ -124,6 +133,9 @@
<if test="isTop != null">
and a.is_top = #{isTop}
</if>
<if test="state != null">
and a.state = #{state}
</if>
order by a.is_top desc, a.update_time desc
</select>
......
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