DESKTOP-71BH0QO\L、ming
2021-04-28 15dbac0af6437e16b6606d5c790d614851493f02
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.panzhihua.service_community.dao;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO;
import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO;
import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
/**
 * @auther lyq
 * @create 2021-04-28 09:20:49
 * @describe 邻里圈表mapper类
 */
@Mapper
public interface ComActNeighborCircleDAO extends BaseMapper<ComActNeighborCircleDO> {
 
    @Select("")
    IPage<ComActNeighborCircleAppVO> pageNeighborByApp(Page page, @Param("neighborCircleAppDTO") ComActNeighborCircleAppDTO neighborCircleAppDTO);
 
    @Select("<script> \n"+
            "SELECT\n" +
            "nc.*,\n" +
            "u.`name` AS releaseName \n" +
            "FROM\n" +
            "com_act_neighbor_circle nc\n" +
            "LEFT JOIN sys_user u ON nc.release_id = u.user_id\n" +
            "<where>"+
            "<if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent.trim() != &quot;&quot;'>" +
            "and t.release_content LIKE concat('%',#{neighborCircleAdminDTO.releaseContent}, '%' )  " +
            " </if> " +
            "<if test='neighborCircleAdminDTO.startAt != null and neighborCircleAdminDTO.endAt !=null '>" +
            "and t.create_at between #{neighborCircleAdminDTO.startAt} and #{neighborCircleAdminDTO.endAt}  " +
            " </if> " +
            "</where>"+
            "order by nc.`status` asc,nc.create_at desc " +
            "</script>")
    IPage<ComActNeighborCircleAdminVO> pageNeighborByAdmin(Page page,@Param("neighborCircleAdminDTO") ComActNeighborCircleAdminDTO neighborCircleAdminDTO);
}