/resource/selectAppList 接口增加参数 area

This commit is contained in:
wangliwen 2022-09-19 11:06:03 +08:00
parent cda3c4968a
commit 8b8d155bc2
3 changed files with 11 additions and 6 deletions

View File

@ -169,9 +169,9 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
List<Map<String, Object>> selectDevelopDocResource(); List<Map<String, Object>> selectDevelopDocResource();
List<Map<String,Object>> resourceInstallationOrDataResourceDetails(Map params); List<Map<String, Object>> resourceInstallationOrDataResourceDetails(Map params);
List<Map> selectAppList(@Param("pageNum") int pageNum, @Param("type") Integer type); List<Map> selectAppList(@Param("pageNum") int pageNum, @Param("type") Integer type, @Param("area") String area);
String selectPicByResId(@Param("id") String id); String selectPicByResId(@Param("id") String id);
@ -182,7 +182,7 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
List<Map> getCIMApplyApplicationList(@Param("deptId") Long deptId); List<Map> getCIMApplyApplicationList(@Param("deptId") Long deptId);
List<Map> getImgServices(@Param("deptid") Long deptid,@Param("type") String type); List<Map> getImgServices(@Param("deptid") Long deptid, @Param("type") String type);
List<Map> cimAssemblyResources(@Param("deptid") Long deptid); List<Map> cimAssemblyResources(@Param("deptid") Long deptid);

View File

@ -1489,7 +1489,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
public Object selectAppList(Map params) { public Object selectAppList(Map params) {
int pageNum = Integer.parseInt(params.get("pageNum").toString()); int pageNum = Integer.parseInt(params.get("pageNum").toString());
Integer type = params.containsKey("type") ? Integer.parseInt(params.get("type").toString()) : null; Integer type = params.containsKey("type") ? Integer.parseInt(params.get("type").toString()) : null;
List<Map> maps = resourceDao.selectAppList((pageNum - 1) * 9, type); String area = params.containsKey("area") ? params.get("area").toString() : null;
List<Map> maps = resourceDao.selectAppList((pageNum - 1) * 9, type, area);
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString()))); maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString())));
return maps; return maps;
} }
@ -2036,12 +2037,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
} }
@Override @Override
public Object selectCensusResourceTable(Map params){ public Object selectCensusResourceTable(Map params) {
return resourceDao.selectCensusResourceTable(params); return resourceDao.selectCensusResourceTable(params);
} }
@Override @Override
public Object selectCensusApplyTable(Map params){ public Object selectCensusApplyTable(Map params) {
return resourceDao.selectCensusApplyTable(params); return resourceDao.selectCensusApplyTable(params);
} }

View File

@ -1564,6 +1564,10 @@
<if test=" type != null and type != ''"> <if test=" type != null and type != ''">
AND sd.type = #{type} AND sd.type = #{type}
</if> </if>
<if test=" area != null and area != ''">
AND JSON_CONTAINS( tdr.info_list, JSON_OBJECT( 'attrType', '应用领域' ))
AND JSON_EXTRACT( tdr.info_list, '$[*].attrValue' ) LIKE CONCAT( '%', #{area}, '%' )
</if>
ORDER BY ORDER BY
sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC
LIMIT ${pageNum}, 9 LIMIT ${pageNum}, 9