|
|
@ -10,7 +10,10 @@ import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.PhoneValidatorUtils; |
|
|
|
import com.epmet.constant.BadgeConstant; |
|
|
|
import com.epmet.constant.SmsTemplateConstant; |
|
|
|
import com.epmet.dao.BadgeDao; |
|
|
|
import com.epmet.dao.ResiUserBadgeDao; |
|
|
|
import com.epmet.dao.UserBadgeDao; |
|
|
|
import com.epmet.dao.UserRoleDao; |
|
|
|
import com.epmet.dto.UserBadgeCertificateRecordDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.*; |
|
|
@ -49,6 +52,12 @@ public class UserBadgeServiceImpl implements UserBadgeService { |
|
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private EpmetMessageOpenFeignClient messageFeignClient; |
|
|
|
@Autowired |
|
|
|
private UserRoleDao userRoleDao; |
|
|
|
@Autowired |
|
|
|
private ResiUserBadgeDao resiUserBadgeDao; |
|
|
|
@Autowired |
|
|
|
private BadgeDao badgeDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 查询已经点亮的徽章 |
|
|
@ -104,27 +113,31 @@ public class UserBadgeServiceImpl implements UserBadgeService { |
|
|
|
}); |
|
|
|
return userOperListResultDTOS; |
|
|
|
} |
|
|
|
List<UserOperListResultDTO> badgeIsOpenedList = userBadgeDao.selectBadgeByUserId(userOperListFormDTO.getUserId()); |
|
|
|
userOperListResultDTOS.forEach(ub -> { |
|
|
|
userAuthBadgeList.forEach(u -> { |
|
|
|
if (ub.getBadgeId().equals(u.getBadgeId())){ |
|
|
|
ub.setIsReject(u.getAuditStatus().equals(BadgeConstant.REJECTED) ? true : false); |
|
|
|
ub.setIsCertificated(u.getAuditStatus().equals(BadgeConstant.APPROVED) ? BadgeConstant.YES : BadgeConstant.NO); |
|
|
|
ub.setIsLighted(u.getIsOpened().equals(NumConstant.ZERO_STR) ? BadgeConstant.NO : BadgeConstant.YES); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (CollectionUtils.isEmpty(badgeIsOpenedList)){ |
|
|
|
ub.setIsLighted(BadgeConstant.NO); |
|
|
|
}else { |
|
|
|
badgeIsOpenedList.forEach(b -> { |
|
|
|
if (ub.getBadgeId().equals(b.getBadgeId())){ |
|
|
|
ub.setIsLighted(b.getIsOpened().equals(NumConstant.ZERO_STR) ? BadgeConstant.NO : BadgeConstant.YES); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
return userOperListResultDTOS; |
|
|
|
} |
|
|
|
|
|
|
|
public void initPartyMemberBadge(){ |
|
|
|
List<String> userIds = userRoleDao.selectPartyMemberUserIds(); |
|
|
|
if (CollectionUtils.isEmpty(userIds)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
List<UserBaseInfoResultDTO> userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(userIds); |
|
|
|
if (CollectionUtils.isEmpty(userBaseInfoResultDTOS)){ |
|
|
|
log.error("未查询到党员基本信息......"); |
|
|
|
throw new RenException("未查询到党员基本信息......"); |
|
|
|
} |
|
|
|
// badgeDao.getPartyBadgeId()
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 个人中心-提交徽章认证 |
|
|
|
* @Param certificationAddFormDTO |
|
|
|