| | |
| | | */ |
| | | @Override |
| | | public R getIntegralUserListApplets(Long userId, Long communityId) { |
| | | // 查询该用户在本社区下的积分账户是否存在,不存在则需要给用户创建 |
| | | ComActIntegralUserDO integralUserDO = |
| | | this.baseMapper.selectOne(new QueryWrapper<ComActIntegralUserDO>().lambda() |
| | | .eq(ComActIntegralUserDO::getCommunityId, communityId).eq(ComActIntegralUserDO::getUserId, userId)); |
| | | if (integralUserDO == null) { |
| | | integralUserDO = new ComActIntegralUserDO(); |
| | | integralUserDO.setCommunityId(communityId); |
| | | integralUserDO.setUserId(userId); |
| | | integralUserDO.setCreateAt(new Date()); |
| | | this.baseMapper.insert(integralUserDO); |
| | | if (nonNull(communityId)) { |
| | | // 查询该用户在本社区下的积分账户是否存在,不存在则需要给用户创建 |
| | | ComActIntegralUserDO integralUserDO = |
| | | this.baseMapper.selectOne(new QueryWrapper<ComActIntegralUserDO>().lambda() |
| | | .eq(ComActIntegralUserDO::getCommunityId, communityId).eq(ComActIntegralUserDO::getUserId, userId)); |
| | | if (integralUserDO == null) { |
| | | integralUserDO = new ComActIntegralUserDO(); |
| | | integralUserDO.setCommunityId(communityId); |
| | | integralUserDO.setUserId(userId); |
| | | integralUserDO.setCreateAt(new Date()); |
| | | this.baseMapper.insert(integralUserDO); |
| | | } |
| | | } |
| | | ComActIntegralUserVO integralUserVO = this.baseMapper.getUserIntegralStatistics(userId, communityId); |
| | | if (isNull(communityId)) { |