| | |
| | | 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() != ""'>" + |
| | | " 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() != ""'>" |
| | | + " and a.name LIKE concat( #{pageComCvtCategoryDTO.name}, '%' ) " + " </if> " + " </where>" |
| | | + " order by a.weight desc" + "</script>") |
| | | IPage<ComCvtCategoryVO> pageComCvtCategory(Page page, |
| | | @Param("pageComCvtCategoryDTO") PageComCvtCategoryDTO pageComCvtCategoryDTO); |
| | | |
| | | } |