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