|
@@ -0,0 +1,57 @@
|
|
|
|
+package com.sky.ioc.mapper.notice;
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
|
+import com.sky.ioc.entity.domain.notice.FeedBack;
|
|
|
|
+import com.sky.ioc.entity.params.notice.NoticeParam;
|
|
|
|
+import org.apache.ibatis.annotations.Mapper;
|
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
|
|
+@Mapper
|
|
|
|
+public interface FeedBackMapper extends BaseMapper<FeedBack> {
|
|
|
|
+
|
|
|
|
+ @Select("<script>" +
|
|
|
|
+ "select id,title,content from feedback where is_del=0 " +
|
|
|
|
+ "<if test='noticeParam!=null and noticeParam.startTime != null '>" +
|
|
|
|
+ "<![CDATA[ and create_time >= #{noticeParam.startTime} AND create_time <= #{noticeParam.endTime} ]]> " +
|
|
|
|
+ "</if>" +
|
|
|
|
+ "<if test='noticeParam!=null and noticeParam.type != null '>" +
|
|
|
|
+ " and type=#{noticeParam.type} " +
|
|
|
|
+ "</if>"+
|
|
|
|
+ "<if test='noticeParam!=null and noticeParam.status != null '>" +
|
|
|
|
+ " and status=#{noticeParam.status} " +
|
|
|
|
+ "</if>"+
|
|
|
|
+ " order by create_time desc limit #{noticeParam.pageSize} offset #{noticeParam.pageStart}" +
|
|
|
|
+ "</script>")
|
|
|
|
+ List<Map<String,Object>> listPage(@Param("noticeParam") NoticeParam noticeParam);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Select("<script>" +
|
|
|
|
+ "select count(1) from feedback where is_del=0 " +
|
|
|
|
+ "<if test='noticeParam!=null and noticeParam.startTime != null '>" +
|
|
|
|
+ "<![CDATA[ and create_time >= #{noticeParam.startTime} AND create_time <= #{noticeParam.endTime} ]]> " +
|
|
|
|
+ "</if>" +
|
|
|
|
+ "<if test='noticeParam!=null and noticeParam.type != null '>" +
|
|
|
|
+ " and type=#{noticeParam.type} " +
|
|
|
|
+ "</if>"+
|
|
|
|
+ "<if test='noticeParam!=null and noticeParam.status != null '>" +
|
|
|
|
+ " and status=#{noticeParam.status} " +
|
|
|
|
+ "</if>"+
|
|
|
|
+ "</script>")
|
|
|
|
+ long countPage(@Param("noticeParam")NoticeParam noticeParam);
|
|
|
|
+
|
|
|
|
+ @Select("<script>" +
|
|
|
|
+ " update feedback set status = 1,update_time = now() " +
|
|
|
|
+ " where id in (<foreach collection='ids' item='id' index='no' separator=','>#{id}</foreach>) "
|
|
|
|
+ + "</script>")
|
|
|
|
+ Integer updateStatusByIds(@Param("ids") List<Integer> ids);
|
|
|
|
+
|
|
|
|
+ @Select("<script>" +
|
|
|
|
+ " update feedback set is_del = 1, update_time = now() " +
|
|
|
|
+ " where id in (<foreach collection='ids' item='id' index='no' separator=','>#{id}</foreach>) "
|
|
|
|
+ + "</script>")
|
|
|
|
+ Integer delByIds(@Param("ids") List<Integer> ids);
|
|
|
|
+}
|