huanghongfa
2021-01-15 ada9d2e3f734582a0d9ae8c00a936d8c8ed669d7
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java
@@ -1,8 +1,14 @@
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.vos.community.ComActDynVO;
import com.panzhihua.common.model.vos.community.ComMngStructAreaVO;
import com.panzhihua.service_community.model.dos.ComMngStructAreaDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -12,4 +18,29 @@
 **/
@Mapper
public interface ComMngStructAreaDAO extends BaseMapper<ComMngStructAreaDO> {
    //    @Select("<script> " +
//            " <where>" +
//            "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
//            " </if> " +
//            "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
//            " </if> " +
//            "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
//            " </if> " +
//            " </where>" +
//            "</script>")
    @Select("<script> " +
            "SELECT\n" +
            "id,\n" +
            "area_name,\n" +
            "address_detail,\n" +
            "create_at \n" +
            "FROM\n" +
            "com_mng_struct_area \n" +
            "WHERE\n" +
            "community_id = #{comMngStructAreaVO.communityId} \n" +
            "<if test='comMngStructAreaVO.areaName != null and comMngStructAreaVO.areaName.trim() != &quot;&quot;'>" +
            "AND area_name = #{comMngStructAreaVO.areaName}" +
            " </if> " +
            "</script>")
    IPage<ComActDynVO> pageArea(Page page, @Param("comMngStructAreaVO") ComMngStructAreaVO comMngStructAreaVO);
}