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() != ""'>" +
|
"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);
|
}
|