|
|
@ -19,13 +19,11 @@ package com.elink.esua.epdc.modules.activity.service.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.elink.esua.epdc.activity.ActUserLogDTO; |
|
|
|
import com.elink.esua.epdc.activity.ActUserRelationDTO; |
|
|
|
import com.elink.esua.epdc.activity.*; |
|
|
|
import com.elink.esua.epdc.activity.form.ActUserRelationAuditFormDTO; |
|
|
|
import com.elink.esua.epdc.activity.result.ActInfoClockResultDTO; |
|
|
|
import com.elink.esua.epdc.activity.result.ActUserClockResultDTO; |
|
|
|
import com.elink.esua.epdc.activity.result.ActUserRelationResultDTO; |
|
|
|
import com.elink.esua.epdc.activity.*; |
|
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
@ -35,6 +33,7 @@ import com.elink.esua.epdc.constant.ActStateConstant; |
|
|
|
import com.elink.esua.epdc.modules.activity.dao.ActUserRelationDao; |
|
|
|
import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity; |
|
|
|
import com.elink.esua.epdc.modules.activity.redis.ActUserRelationRedis; |
|
|
|
import com.elink.esua.epdc.modules.activity.service.ActInfoService; |
|
|
|
import com.elink.esua.epdc.modules.activity.service.ActUserLogService; |
|
|
|
import com.elink.esua.epdc.modules.activity.service.ActUserRelationService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -59,6 +58,9 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD |
|
|
|
@Autowired |
|
|
|
private ActUserLogService actUserLogService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ActInfoService actInfoService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<ActUserRelationDTO> page(Map<String, Object> params) { |
|
|
|
IPage<ActUserRelationEntity> page = baseDao.selectPage( |
|
|
@ -266,25 +268,29 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Result updateAuditDefaultStatus(String actId) { |
|
|
|
//查询已报名未审核的志愿者
|
|
|
|
// 根据actID查询活动开始未审核报名人默认状态
|
|
|
|
ActInfoDTO actInfoDTO = actInfoService.get(actId); |
|
|
|
String actUserDefaultState = actInfoDTO.getActUserDefaultState(); // 活动开始未审核报名人默认状态
|
|
|
|
|
|
|
|
// 查询已报名未审核的志愿者
|
|
|
|
List<ActUserRelationDTO> data = baseDao.selectListActUserInfo(actId); |
|
|
|
if(data != null && data.size() > 0){ |
|
|
|
for(int i = 0 ; i < data.size() ; i++){ |
|
|
|
//更新人员活动关系表
|
|
|
|
// 更新人员活动关系表
|
|
|
|
ActUserRelationDTO actUserRelationDTO = data.get(i); |
|
|
|
actUserRelationDTO.setStatus("1");//审核通过
|
|
|
|
actUserRelationDTO.setStatus(actUserDefaultState);// 默认状态
|
|
|
|
ActUserRelationEntity entity = ConvertUtils.sourceToTarget(actUserRelationDTO, ActUserRelationEntity.class); |
|
|
|
updateById(entity); |
|
|
|
//存储活动日志表
|
|
|
|
// 存储活动日志表
|
|
|
|
ActUserLogDTO actUserLogDTO = new ActUserLogDTO(); |
|
|
|
actUserLogDTO.setActId(actUserRelationDTO.getActId()); |
|
|
|
actUserLogDTO.setUserId(actUserRelationDTO.getUserId()); |
|
|
|
actUserLogDTO.setOperationType("1");//审核通过
|
|
|
|
actUserLogDTO.setOperationType(actUserDefaultState);// 默认状态
|
|
|
|
actUserLogDTO.setOperationTime(new Date()); |
|
|
|
actUserLogService.save(actUserLogDTO); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
return new Result().error("该活动暂时没有未审核的志愿者"); |
|
|
|
return new Result().ok("该活动暂时没有未审核的志愿者"); |
|
|
|
} |
|
|
|
|
|
|
|
return new Result().ok("该活动对已报名的志愿者自动审核成功"); |
|
|
|