处理片长问题
This commit is contained in:
parent
9eb150d890
commit
475c55cd0f
@ -202,6 +202,7 @@ public class CommunityBossController extends AbstractController {
|
||||
public List<CommunityBossDTO> listCommunityBossByCommunity(@PathVariable("communityId") String communityId) throws SearchException {
|
||||
Map<String, Object> params = requestParams();
|
||||
params.put("communityId", communityId);
|
||||
|
||||
return communityBossService.listCommunityBossByCommunity(params);
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,15 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
||||
|
||||
@Override
|
||||
public List<CommunityBossDTO> listCommunityBossByCommunity(Map<String, Object> params) throws SearchException {
|
||||
return communityBossDao.listCommunityBossByCommunity(params);
|
||||
Object communityBossLevel = params.get("communityBossLevel");
|
||||
List<CommunityBossDTO> communityBossDTOs;
|
||||
if (communityBossLevel == null || StringUtils.equals("1", communityBossLevel.toString())) {
|
||||
communityBossDTOs = communityBossDao.listCommunityBoss(params);
|
||||
} else {
|
||||
communityBossDTOs = communityBossDao.listCommunityBossByCommunity(params);
|
||||
}
|
||||
setUserInfo(communityBossDTOs);
|
||||
return communityBossDTOs;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -486,19 +486,7 @@ public class UserPointsServiceImpl extends AbstractService implements IUserPoint
|
||||
params.put("communityBossLevel", communityBossDTO.getCommunityBossLevel());
|
||||
List<CommunityBossDTO> communityBossDTOs = communityBossService.listCommunityBossByCommunity(params);
|
||||
for (CommunityBossDTO communityBoss : communityBossDTOs) {
|
||||
/**
|
||||
boolean isSelf = false;
|
||||
for (String userId : userIdArray) {
|
||||
if (StringUtils.equals(communityBoss.getCommunityBossId(), userId)) {
|
||||
isSelf = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isSelf) {
|
||||
continue;
|
||||
}
|
||||
**/
|
||||
bgUserIdArray.add(communityBoss.getCommunityBossId());
|
||||
bgUserIdArray.add(communityBoss.getCommunityBossUserId());
|
||||
}
|
||||
}
|
||||
GridMemberGridFullDTO gridMemberGridFullDTO = new GridMemberGridFullDTO();
|
||||
@ -548,10 +536,10 @@ public class UserPointsServiceImpl extends AbstractService implements IUserPoint
|
||||
List<CommunityBossDTO> communityBossDTOs = communityBossService.listCommunityBossByCommunity(params);
|
||||
for (CommunityBossDTO communityBoss : communityBossDTOs) {
|
||||
// 自己的跳过
|
||||
if (StringUtils.equals(communityBoss.getCommunityBossId(), userIdArray.get(0))) {
|
||||
if (StringUtils.equals(communityBoss.getCommunityBossUserId(), userIdArray.get(0))) {
|
||||
continue;
|
||||
}
|
||||
bgUserIdArray.add(communityBoss.getCommunityBossId());
|
||||
bgUserIdArray.add(communityBoss.getCommunityBossUserId());
|
||||
}
|
||||
}
|
||||
GridMemberGridFullDTO gridMemberGridFullDTO = new GridMemberGridFullDTO();
|
||||
@ -653,7 +641,7 @@ public class UserPointsServiceImpl extends AbstractService implements IUserPoint
|
||||
// 创建userId集合,用于请求GridService接口。
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
for (CommunityBossDTO communityBossDTO : communityBossDTOs) {
|
||||
userIdList.add(communityBossDTO.getCommunityBossId());
|
||||
userIdList.add(communityBossDTO.getCommunityBossUserId());
|
||||
}
|
||||
List<GridDTO> userAndPointsDTOs = listUserPointsByGridService(userIdList);
|
||||
return userAndPointsDTOs;
|
||||
|
@ -288,41 +288,42 @@
|
||||
t1.community_boss_user_id,
|
||||
t1.community_boss_parent_id,
|
||||
t1.community_boss_parent_user_id,
|
||||
t2.community_id,
|
||||
t2.community_id
|
||||
FROM
|
||||
city_community_boss t1
|
||||
LEFT JOIN
|
||||
INNER JOIN
|
||||
city_community_boss_community t2
|
||||
ON
|
||||
t1.community_boss_id = t2.community_boss_id
|
||||
<if test="communityId != null and communityId != '' and communityId != 'nocummonity'">
|
||||
AND
|
||||
t2.community_id = #{communityId}
|
||||
</if>
|
||||
<if test="communityIds != null and communityIds.size > 0">
|
||||
AND
|
||||
t2.community_id IN
|
||||
<foreach collection="communityIds" index="index" open="(" separator="," close=")">
|
||||
#{communityIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="communityBossLevel != null and communityBossLevel != ''">
|
||||
AND
|
||||
t1.community_boss_level = #{communityBossLevel}
|
||||
</if>
|
||||
<if test="communityBossIds != null and communityBossIds != ''">
|
||||
AND
|
||||
t1.community_boss_id IN
|
||||
<foreach collection="communityBossIds" index="index" open="(" separator="," close=")">
|
||||
#{communityBossIds[index]}
|
||||
</foreach>
|
||||
</if>
|
||||
<where>
|
||||
<if test="communityId != null and communityId != '' and communityId != 'nocummonity'">
|
||||
t2.community_id = #{communityId}
|
||||
</if>
|
||||
<if test="communityIds != null and communityIds.size > 0">
|
||||
AND
|
||||
t2.community_id IN
|
||||
<foreach collection="communityIds" index="index" open="(" separator="," close=")">
|
||||
#{communityIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="communityBossLevel != null and communityBossLevel != ''">
|
||||
AND
|
||||
t1.community_boss_level = #{communityBossLevel}
|
||||
</if>
|
||||
<if test="communityBossIds != null and communityBossIds != ''">
|
||||
AND
|
||||
t1.community_boss_id IN
|
||||
<foreach collection="communityBossIds" index="index" open="(" separator="," close=")">
|
||||
#{communityBossIds[index]}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
t1.community_boss_id,
|
||||
t1.community_boss_user_id,
|
||||
t1.community_boss_parent_id,
|
||||
t1.community_boss_parent_user_id,
|
||||
t2.community_id,
|
||||
t2.community_id
|
||||
</select>
|
||||
|
||||
<!-- 片长详情列表 -->
|
||||
|
Loading…
Reference in New Issue
Block a user