|
|
@ -42,13 +42,10 @@ import com.elink.esua.epdc.dao.PartyAuthenticationFailedDao; |
|
|
import com.elink.esua.epdc.dao.PartyMembersDao; |
|
|
import com.elink.esua.epdc.dao.PartyMembersDao; |
|
|
import com.elink.esua.epdc.dao.UserAuthenticateHistoryDao; |
|
|
import com.elink.esua.epdc.dao.UserAuthenticateHistoryDao; |
|
|
import com.elink.esua.epdc.dao.UserDao; |
|
|
import com.elink.esua.epdc.dao.UserDao; |
|
|
import com.elink.esua.epdc.dto.CachingUserInfoDTO; |
|
|
import com.elink.esua.epdc.dto.*; |
|
|
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.UserDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcUserRegistFormDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcUserRegistFormDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.result.*; |
|
|
import com.elink.esua.epdc.dto.epdc.result.*; |
|
|
import com.elink.esua.epdc.dto.UserGridRelationDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.epdc.EpdcCompleteAppUserDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.EpdcCompleteAppUserDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.EpdcGridLeaderRegisterDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.EpdcGridLeaderRegisterDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.form.*; |
|
|
import com.elink.esua.epdc.dto.epdc.form.*; |
|
|
@ -1019,6 +1016,11 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem |
|
|
public EpdcAppUserRankingResultDTO listUserPointsRanking(EpdcAppUserRankingFormDTO formDto) { |
|
|
public EpdcAppUserRankingResultDTO listUserPointsRanking(EpdcAppUserRankingFormDTO formDto) { |
|
|
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); |
|
|
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); |
|
|
formDto.setPageIndex(pageIndex); |
|
|
formDto.setPageIndex(pageIndex); |
|
|
|
|
|
|
|
|
|
|
|
// 获取 用户网格关系表 中的 用户id,做网格/街道 积分排行的源用户数据
|
|
|
|
|
|
List<String> listUser = this.getActRankingUserId(formDto); |
|
|
|
|
|
formDto.setAllUserIdByDept(listUser); |
|
|
|
|
|
|
|
|
// 积分相同,排名相同
|
|
|
// 积分相同,排名相同
|
|
|
EpdcAppUserRankingResultDTO rangking = new EpdcAppUserRankingResultDTO(); |
|
|
EpdcAppUserRankingResultDTO rangking = new EpdcAppUserRankingResultDTO(); |
|
|
// 获取排好序的 排行榜数据数据
|
|
|
// 获取排好序的 排行榜数据数据
|
|
|
@ -1026,12 +1028,36 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem |
|
|
// 查询当前用户积分记录
|
|
|
// 查询当前用户积分记录
|
|
|
EpdcAppRankingUserDTO currentUserDTO = baseDao.selectCurrentUserRanking(formDto); |
|
|
EpdcAppRankingUserDTO currentUserDTO = baseDao.selectCurrentUserRanking(formDto); |
|
|
// 返回当前登录用户积分排名
|
|
|
// 返回当前登录用户积分排名
|
|
|
|
|
|
if (null != currentUserDTO) { |
|
|
currentUserDTO.setUserId(formDto.getUserId()); |
|
|
currentUserDTO.setUserId(formDto.getUserId()); |
|
|
currentUserDTO.setRealName(formDto.getRealName()); |
|
|
currentUserDTO.setRealName(formDto.getRealName()); |
|
|
rangking.setCurrentUser(currentUserDTO); |
|
|
rangking.setCurrentUser(currentUserDTO); |
|
|
|
|
|
} |
|
|
return rangking; |
|
|
return rangking; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 返回本次 积分排行 用户网格关系表中的用户id |
|
|
|
|
|
* @param formDto |
|
|
|
|
|
* @return java.util.List<java.lang.String> |
|
|
|
|
|
* @Author zhangyong |
|
|
|
|
|
* @Date 17:25 2020-06-04 |
|
|
|
|
|
**/ |
|
|
|
|
|
private List<String> getActRankingUserId(EpdcAppUserRankingFormDTO formDto){ |
|
|
|
|
|
if (NumConstant.ZERO == formDto.getRankingType()){ |
|
|
|
|
|
// 根据网格查询排行榜
|
|
|
|
|
|
formDto.setDeptId(formDto.getDeptId()); |
|
|
|
|
|
} else if (NumConstant.ONE == formDto.getRankingType()) { |
|
|
|
|
|
// 根据街道查询排行榜
|
|
|
|
|
|
Result<CompleteDeptDTO> deptDto = adminFeignClient.getCompleteDept(formDto.getDeptId()); |
|
|
|
|
|
if (deptDto.success()) { |
|
|
|
|
|
formDto.setDeptId(deptDto.getData().getStreetId()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 根据从 用户网格关系表中查询到的用户id,做积分排名比较
|
|
|
|
|
|
List<String> listUser = userGridRelationService.listUserIdByDeptId(formDto.getDeptId()); |
|
|
|
|
|
return listUser; |
|
|
|
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 获取【排好序】的排行榜数据 |
|
|
* 获取【排好序】的排行榜数据 |
|
|
* @param formDto |
|
|
* @param formDto |
|
|
|