pageWithAttrs 非中文数量不正确的处理
This commit is contained in:
parent
f39b22751f
commit
d07548e6eb
|
@ -53,7 +53,7 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
|
||||||
*/
|
*/
|
||||||
List<Map> selectDTOPageSpecilTotal(@Param("dto") ResourceDTO resourceDTO);
|
List<Map> selectDTOPageSpecilTotal(@Param("dto") ResourceDTO resourceDTO);
|
||||||
|
|
||||||
Long selectDTOPageCount(@Param("dto") ResourceDTO resourceDTO);
|
Long selectDTOPageCount(@Param("dto") ResourceDTO resourceDTO, @Param("nonChinese") Boolean nonChinese);
|
||||||
|
|
||||||
List<Map> selectApplyArea(Long userId);
|
List<Map> selectApplyArea(Long userId);
|
||||||
|
|
||||||
|
|
|
@ -554,7 +554,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType, null, nonChinese);
|
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType, null, nonChinese);
|
||||||
}
|
}
|
||||||
resultPage.setRecords(resourceDTOS);
|
resultPage.setRecords(resourceDTOS);
|
||||||
resultPage.setTotal(resourceDao.selectDTOPageCount(resourceDTO));
|
resultPage.setTotal(resourceDao.selectDTOPageCount(resourceDTO, nonChinese));
|
||||||
} else {
|
} else {
|
||||||
logger.info("排序要求 orderField:{} orderType:{}", orderField, orderType);
|
logger.info("排序要求 orderField:{} orderType:{}", orderField, orderType);
|
||||||
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType, nonChinese);
|
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType, nonChinese);
|
||||||
|
|
|
@ -539,9 +539,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
AND tdr.del_flag = 0
|
AND tdr.del_flag = 0
|
||||||
<if test="dto.name != null and dto.name != ''">
|
<if test="dto.name != null and dto.name != '' and nonChinese == false">
|
||||||
AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE)
|
AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dto.name != null and dto.name != '' and nonChinese == true">
|
||||||
|
AND tdr.name LIKE CONCAT( '%', #{dto.name}, '%' )
|
||||||
|
</if>
|
||||||
<if test="dto.type != null and dto.type != ''">
|
<if test="dto.type != null and dto.type != ''">
|
||||||
AND tdr.type = #{dto.type}
|
AND tdr.type = #{dto.type}
|
||||||
</if>
|
</if>
|
||||||
|
@ -1621,14 +1624,14 @@
|
||||||
tb_data_attr tda
|
tb_data_attr tda
|
||||||
LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id
|
LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
<if test="resourceType == '应用资源'" >
|
<if test="resourceType == '应用资源'">
|
||||||
AND tda.attr_type = '应用图片'
|
AND tda.attr_type = '应用图片'
|
||||||
</if>
|
</if>
|
||||||
<if test="resourceType == '图层服务'" >
|
<if test="resourceType == '图层服务'">
|
||||||
AND tda.attr_type = '图层缩略图'
|
AND tda.attr_type = '图层缩略图'
|
||||||
</if>
|
</if>
|
||||||
<if test="resourceType == '智能算法'" >
|
<if test="resourceType == '智能算法'">
|
||||||
AND tda.attr_type = '应用场景'
|
AND tda.attr_type = '应用场景'
|
||||||
</if>
|
</if>
|
||||||
AND tdr.id = #{id}
|
AND tdr.id = #{id}
|
||||||
AND tda.del_flag = 0
|
AND tda.del_flag = 0
|
||||||
|
|
Loading…
Reference in New Issue