huanghongfa
2021-08-21 2e64c232ab6b51b2cecf1ee96e1e9b709234f326
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
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.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);
 
}