片长查询报错问题
This commit is contained in:
parent
6beceac159
commit
12484e067b
@ -293,17 +293,16 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
|||||||
@Override
|
@Override
|
||||||
public List<CommunityBossDTO> listCommunityBoss(Map<String, Object> params) throws SearchException {
|
public List<CommunityBossDTO> listCommunityBoss(Map<String, Object> params) throws SearchException {
|
||||||
if (params.get("keywords") != null && !params.get("keywords").toString().isEmpty()) {
|
if (params.get("keywords") != null && !params.get("keywords").toString().isEmpty()) {
|
||||||
List<UserResourceBO> userResourceBOs = userService.listResourceByKeywords(params.get("keywords").toString());
|
List<UserResourceBO> userResourceBOs = userService.listResourceByKeywords(params.get("keywords").toString());
|
||||||
Set<String> userIdSet = new HashSet<>();
|
Set<String> userIdSet = new HashSet<>();
|
||||||
userResourceBOs.forEach(userResourceBO -> {
|
userResourceBOs.forEach(userResourceBO -> {
|
||||||
userIdSet.add(userResourceBO.getUserId());
|
userIdSet.add(userResourceBO.getUserId());
|
||||||
});
|
});
|
||||||
if (userIdSet.isEmpty()) {
|
if (userIdSet.isEmpty()) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
params.put("communityBossUserIds", new ArrayList<>(userIdSet));
|
params.put("communityBossUserIds", new ArrayList<>(userIdSet));
|
||||||
params.put("communityBossParentUserIds", new ArrayList<>(userIdSet));
|
params.remove("keywords");
|
||||||
|
|
||||||
}
|
}
|
||||||
List<CommunityBossDTO> communityBossDTOs = communityBossDao.listCommunityBoss(params);
|
List<CommunityBossDTO> communityBossDTOs = communityBossDao.listCommunityBoss(params);
|
||||||
setUserInfo(communityBossDTOs);
|
setUserInfo(communityBossDTOs);
|
||||||
|
@ -196,17 +196,12 @@
|
|||||||
AND
|
AND
|
||||||
t1.community_boss_id = #{communityBossId}
|
t1.community_boss_id = #{communityBossId}
|
||||||
</if>
|
</if>
|
||||||
<if test="communityBossUserIds != null and communityBossUserIds.size > 0 and communityBossParentUserIds != null and communityBossParentUserIds.size > 0">
|
<if test="communityBossUserIds != null and communityBossUserIds.size > 0">
|
||||||
AND (
|
AND (
|
||||||
t1.community_boss_user_id IN
|
t1.community_boss_user_id IN
|
||||||
<foreach collection="communityBossUserIds" index="index" open="(" separator="," close=")">
|
<foreach collection="communityBossUserIds" index="index" open="(" separator="," close=")">
|
||||||
#{communityBossUserIds[${index}]}
|
#{communityBossUserIds[${index}]}
|
||||||
</foreach>
|
</foreach>
|
||||||
OR
|
|
||||||
t1.community_boss_parent_user_id IN
|
|
||||||
<foreach collection="communityBossParentUserIds" index="index" open="(" separator="," close=")">
|
|
||||||
#{communityBossParentUserIds[${index}]}
|
|
||||||
</foreach>
|
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="communityBossParentUserIds != null and communityBossParentUserIds.size > 0">
|
<if test="communityBossParentUserIds != null and communityBossParentUserIds.size > 0">
|
||||||
|
Loading…
Reference in New Issue
Block a user