huanghongfa
2021-09-02 177249c76aeea0b4bf8d8816d4994e3b445b45ce
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCvtCategoryDAO.java
@@ -1,30 +1,24 @@
package com.panzhihua.service_community.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
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.community.PageComCvtCategoryDTO;
import com.panzhihua.common.model.vos.community.ComCvtCategoryVO;
import com.panzhihua.service_community.model.dos.ComCvtCategoryDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface ComCvtCategoryDAO extends BaseMapper<ComCvtCategoryDO> {
    @Select("<script> " +
            "SELECT " +
            "a.*  " +
            "FROM " +
            "com_cvt_category a  " +
            " <where>" +
            "<if test='pageComCvtCategoryDTO.name != null and pageComCvtCategoryDTO.name.trim() != &quot;&quot;'>" +
            " and a.name LIKE concat( #{pageComCvtCategoryDTO.name}, '%' )  " +
            " </if> " +
            " </where>" +
            " order by a.weight desc"+
            "</script>")
    IPage<ComCvtCategoryVO> pageComCvtCategory(Page page, @Param("pageComCvtCategoryDTO") PageComCvtCategoryDTO pageComCvtCategoryDTO);
    @Select("<script> " + "SELECT " + "a.*  " + "FROM " + "com_cvt_category a  " + " <where>"
        + "<if test='pageComCvtCategoryDTO.name != null and pageComCvtCategoryDTO.name.trim() != &quot;&quot;'>"
        + " and a.name LIKE concat( #{pageComCvtCategoryDTO.name}, '%' )  " + " </if> " + " </where>"
        + " order by a.weight desc" + "</script>")
    IPage<ComCvtCategoryVO> pageComCvtCategory(Page page,
        @Param("pageComCvtCategoryDTO") PageComCvtCategoryDTO pageComCvtCategoryDTO);
}