Commit cf62cb54 by 杨林龙

对历史轨迹查询增加筛选

1 parent 745036e4
...@@ -65,5 +65,5 @@ public interface PoiFenceMapper extends CommonBaseMapper<PoiFence> { ...@@ -65,5 +65,5 @@ public interface PoiFenceMapper extends CommonBaseMapper<PoiFence> {
* *
* @return 历史轨迹点 * @return 历史轨迹点
*/ */
List<PoiFence> queryPoiTrack(); List<PoiFence> queryPoiTrack(@Param("userId") Long userId);
} }
\ No newline at end of file \ No newline at end of file
...@@ -186,7 +186,12 @@ public class PoiFenceService extends AbstractCommonService { ...@@ -186,7 +186,12 @@ public class PoiFenceService extends AbstractCommonService {
* @return * @return
*/ */
public List<PoiFenceTrackVO> queryPoiTrack() { public List<PoiFenceTrackVO> queryPoiTrack() {
List<PoiFence> poiFenceList = poiFenceMapper.queryPoiTrack(); Long userId = null;
// 非管理员设置当前用户ID
if (!ShieldContextHolder.isSuperAdmin()) {
userId = ShieldContextHolder.getUserId();
}
List<PoiFence> poiFenceList = poiFenceMapper.queryPoiTrack(userId);
List<PoiFenceTrackVO> poiFenceTrackList = Lists.newArrayList(); List<PoiFenceTrackVO> poiFenceTrackList = Lists.newArrayList();
poiFenceList.forEach(poiFence -> { poiFenceList.forEach(poiFence -> {
PoiFenceTrackVO poiFenceTrackVO = new PoiFenceTrackVO(); PoiFenceTrackVO poiFenceTrackVO = new PoiFenceTrackVO();
......
...@@ -136,6 +136,9 @@ ...@@ -136,6 +136,9 @@
from t_poi_fence from t_poi_fence
where del_flag = 0 where del_flag = 0
and enable_status = 1 and enable_status = 1
<if test="userId != null ">
and created_by in (#{userId})
</if>
order by id desc order by id desc
limit 3000 limit 3000
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!