/resource/selectAppList 接口增加参数 area
This commit is contained in:
parent
cda3c4968a
commit
8b8d155bc2
|
@ -171,7 +171,7 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue