Browse Source

可胜任组长-组员列表(工作端通用)

dev_shibei_match
zxc 4 years ago
parent
commit
e69ba7d130
  1. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java
  2. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  3. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  4. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java
  5. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java

@ -42,4 +42,12 @@ public interface UserBaseInfoDao extends BaseDao<UserBaseInfoEntity> {
*/
List<UserInfosResultDTO> selectUserInfosByUserIds(@Param("userIds") List<String> userIds);
/**
* @Description 查询客户下是党员/热心居民的userId
* @Param customerId
* @author zxc
* @date 2021/4/1 上午9:08
*/
List<String> selectUserIdByCustomerId(@Param("customerId") String customerId);
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java

@ -18,4 +18,12 @@ public interface EpmetUserService {
*/
List<UserInfosResultDTO> selectUserInfosByUserIds(List<String> userIds);
/**
* @Description 查询客户下是党员/热心居民的userId
* @Param customerId
* @author zxc
* @date 2021/4/1 上午9:08
*/
List<String> selectUserIdByCustomerId(String customerId);
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -33,4 +33,15 @@ public class EpmetUserServiceImpl implements EpmetUserService {
public List<UserInfosResultDTO> selectUserInfosByUserIds(List<String> userIds) {
return userBaseInfoDao.selectUserInfosByUserIds(userIds);
}
/**
* @Description 查询客户下是党员/热心居民的userId
* @Param customerId
* @author zxc
* @date 2021/4/1 上午9:08
*/
@Override
public List<String> selectUserIdByCustomerId(String customerId) {
return userBaseInfoDao.selectUserIdByCustomerId(customerId);
}
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java

@ -76,6 +76,12 @@ public class ResiGroupServiceImpl implements ResiGroupService {
List<String> badgeInfo = resiGroupRedis.getBadgeInfoByUserId(formDTO.getCustomerId(), r.getUserId());
r.setBadgeList(null==badgeInfo ? new ArrayList<>() : badgeInfo);
});
return result;
List<String> showUsers = epmetUserService.selectUserIdByCustomerId(formDTO.getCustomerId());
if (CollectionUtils.isEmpty(showUsers)){
return new ArrayList<>();
}
List<CandidateListResultDTO> disResult = new ArrayList<>();
showUsers.forEach(u -> result.stream().filter(r -> u.equals(r.getUserId())).forEach(r -> disResult.add(r)));
return disResult;
}
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml

@ -22,4 +22,15 @@
</foreach>
)
</select>
<!-- 查询客户下是党员/热心居民的userId -->
<select id="selectUserIdByCustomerId" resultType="java.lang.String">
SELECT
DISTINCT(ur.USER_ID) AS userId
FROM epmet_role er
LEFT JOIN user_role ur ON ur.ROLE_ID = er.ID
WHERE ur.DEL_FLAG = 0
AND (er.ROLE_KEY = 'warmhearted' OR er.ROLE_KEY = 'partymember')
AND CUSTOMER_ID = #{customerId}
</select>
</mapper>
Loading…
Cancel
Save