|
@ -13,11 +13,15 @@ import com.epmet.constant.ReadFlagConstant; |
|
|
import com.epmet.dao.ActInfoDao; |
|
|
import com.epmet.dao.ActInfoDao; |
|
|
import com.epmet.dao.ActUserLogDao; |
|
|
import com.epmet.dao.ActUserLogDao; |
|
|
import com.epmet.dao.ActUserRelationDao; |
|
|
import com.epmet.dao.ActUserRelationDao; |
|
|
|
|
|
import com.epmet.dto.ActInfoDTO; |
|
|
import com.epmet.dto.ActUserLogDTO; |
|
|
import com.epmet.dto.ActUserLogDTO; |
|
|
import com.epmet.dto.ActUserRelationDTO; |
|
|
import com.epmet.dto.ActUserRelationDTO; |
|
|
import com.epmet.dto.HeartUserInfoDTO; |
|
|
import com.epmet.dto.HeartUserInfoDTO; |
|
|
import com.epmet.dto.form.UserMessageFormDTO; |
|
|
import com.epmet.dto.form.UserMessageFormDTO; |
|
|
import com.epmet.dto.form.work.*; |
|
|
import com.epmet.dto.form.work.AactUserDetailFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.work.ActIdFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.work.AuditUserFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.work.UserHistoricalActFormDTO; |
|
|
import com.epmet.dto.result.UserBaseInfoResultDTO; |
|
|
import com.epmet.dto.result.UserBaseInfoResultDTO; |
|
|
import com.epmet.dto.result.work.*; |
|
|
import com.epmet.dto.result.work.*; |
|
|
import com.epmet.entity.ActInfoEntity; |
|
|
import com.epmet.entity.ActInfoEntity; |
|
@ -25,6 +29,7 @@ import com.epmet.entity.ActUserLogEntity; |
|
|
import com.epmet.entity.ActUserRelationEntity; |
|
|
import com.epmet.entity.ActUserRelationEntity; |
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
|
|
import com.epmet.service.ActInfoService; |
|
|
import com.epmet.service.ActUserRelationService; |
|
|
import com.epmet.service.ActUserRelationService; |
|
|
import com.epmet.service.HeartUserInfoService; |
|
|
import com.epmet.service.HeartUserInfoService; |
|
|
import com.epmet.service.WorkActUserService; |
|
|
import com.epmet.service.WorkActUserService; |
|
@ -32,6 +37,7 @@ import org.apache.logging.log4j.LogManager; |
|
|
import org.apache.logging.log4j.Logger; |
|
|
import org.apache.logging.log4j.Logger; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
@ -62,6 +68,8 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private LoginUserUtil loginUserUtil; |
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private ActInfoService actInfoService; |
|
|
/** |
|
|
/** |
|
|
* @param formDTO |
|
|
* @param formDTO |
|
|
* @return java.util.List<com.epmet.dto.result.work.AuditingActUserResultDTO> |
|
|
* @return java.util.List<com.epmet.dto.result.work.AuditingActUserResultDTO> |
|
@ -358,6 +366,7 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
* @Date 2020/7/23 17:30 |
|
|
* @Date 2020/7/23 17:30 |
|
|
**/ |
|
|
**/ |
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void auditPass(String actUserRelationId) { |
|
|
public void auditPass(String actUserRelationId) { |
|
|
ActUserRelationEntity actUserRelationEntity=actUserRelationDao.selectById(actUserRelationId); |
|
|
ActUserRelationEntity actUserRelationEntity=actUserRelationDao.selectById(actUserRelationId); |
|
|
if(null==actUserRelationEntity||!ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserRelationEntity.getStatus())){ |
|
|
if(null==actUserRelationEntity||!ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserRelationEntity.getStatus())){ |
|
@ -404,6 +413,7 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
* @Date 2020/7/23 18:14 |
|
|
* @Date 2020/7/23 18:14 |
|
|
**/ |
|
|
**/ |
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void auditRefuse(AuditUserFormDTO formDTO) { |
|
|
public void auditRefuse(AuditUserFormDTO formDTO) { |
|
|
ActUserRelationEntity actUserRelationEntity=actUserRelationDao.selectById(formDTO.getActUserRelationId()); |
|
|
ActUserRelationEntity actUserRelationEntity=actUserRelationDao.selectById(formDTO.getActUserRelationId()); |
|
|
if(null==actUserRelationEntity||!ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserRelationEntity.getStatus())){ |
|
|
if(null==actUserRelationEntity||!ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserRelationEntity.getStatus())){ |
|
@ -451,6 +461,11 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
**/ |
|
|
**/ |
|
|
@Override |
|
|
@Override |
|
|
public List<JoinedUserResultDTO> queryJoinUserList(ActIdFormDTO formDTO) { |
|
|
public List<JoinedUserResultDTO> queryJoinUserList(ActIdFormDTO formDTO) { |
|
|
|
|
|
ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); |
|
|
|
|
|
if(null==actInfoDTO){ |
|
|
|
|
|
logger.error("act_info is null"); |
|
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
|
} |
|
|
List<JoinedUserResultDTO> list=actInfoDao.queryJoinUserList(formDTO.getActId()); |
|
|
List<JoinedUserResultDTO> list=actInfoDao.queryJoinUserList(formDTO.getActId()); |
|
|
if(null!=list&&list.size()>0){ |
|
|
if(null!=list&&list.size()>0){ |
|
|
//查询已通过审核的人员id集合
|
|
|
//查询已通过审核的人员id集合
|
|
@ -458,11 +473,21 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
//根据已通过的人员集合,查询出用户基本信息
|
|
|
//根据已通过的人员集合,查询出用户基本信息
|
|
|
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfoList(userIdList); |
|
|
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfoList(userIdList); |
|
|
for(JoinedUserResultDTO joinedUserResultDTO:list){ |
|
|
for(JoinedUserResultDTO joinedUserResultDTO:list){ |
|
|
//积分描述赋值
|
|
|
if(actInfoDTO.getActStatus().equals(ActConstant.ACT_STATUS_FINISHED)){ |
|
|
if(ActConstant.ACT_USER_STATUS_AGREE.equals(joinedUserResultDTO.getRewardFlag())){ |
|
|
//积分描述赋值
|
|
|
joinedUserResultDTO.setPointsDes(String.format("积分+%s",joinedUserResultDTO.getReward())); |
|
|
if(ActConstant.ACT_USER_STATUS_AGREE.equals(joinedUserResultDTO.getRewardFlag())){ |
|
|
}else if(ActConstant.ACT_USER_STATUS_DENY.equals(joinedUserResultDTO.getRewardFlag())){ |
|
|
joinedUserResultDTO.setPointsDes(String.format("积分+%s",joinedUserResultDTO.getReward())); |
|
|
joinedUserResultDTO.setPointsDes("积分+0"); |
|
|
}else if(ActConstant.ACT_USER_STATUS_DENY.equals(joinedUserResultDTO.getRewardFlag())){ |
|
|
|
|
|
joinedUserResultDTO.setPointsDes("积分+0"); |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
logger.info("当前活动未结束,活动状态:"+actInfoDTO.getActStatus()); |
|
|
|
|
|
joinedUserResultDTO.setPointsDes(StrConstant.EPMETY_STR); |
|
|
|
|
|
} |
|
|
|
|
|
if(ActConstant.ACT_USER_STATUS_SIGNED_IN.equals(joinedUserResultDTO.getSignInFlagStr())){ |
|
|
|
|
|
joinedUserResultDTO.setSignInFlag(true); |
|
|
|
|
|
}else{ |
|
|
|
|
|
joinedUserResultDTO.setSignInFlag(false); |
|
|
} |
|
|
} |
|
|
//志愿者标识赋值
|
|
|
//志愿者标识赋值
|
|
|
joinedUserResultDTO.setVolunteerFlag(this.getVolunteerFlag(joinedUserResultDTO.getUserId())); |
|
|
joinedUserResultDTO.setVolunteerFlag(this.getVolunteerFlag(joinedUserResultDTO.getUserId())); |
|
|