|
|
@ -19,6 +19,7 @@ package com.elink.esua.epdc.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.map.MapUtil; |
|
|
|
import com.alibaba.nacos.client.naming.utils.CollectionUtils; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.elink.esua.epdc.async.NewsTask; |
|
|
@ -45,10 +46,12 @@ import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListCountResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; |
|
|
|
import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; |
|
|
|
import com.elink.esua.epdc.entity.VolunteerInfoEntity; |
|
|
|
import com.elink.esua.epdc.feign.AdminFeignClient; |
|
|
|
import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; |
|
|
|
import com.elink.esua.epdc.service.UserTagRelationService; |
|
|
|
import com.elink.esua.epdc.service.VlounteerTeamRealationService; |
|
|
|
import com.elink.esua.epdc.service.VolunteerInfoService; |
|
|
|
import com.elink.esua.epdc.service.VolunteerTagRelationService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
@ -84,6 +87,9 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
@Autowired |
|
|
|
private VlounteerTeamRealationDao vlounteerTeamRealationDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private VlounteerTeamRealationService vlounteerTeamRealationService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据查询条件,返回首页 志愿者信息列表 |
|
|
|
* |
|
|
@ -465,7 +471,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
userTagRelationService.addUserTagRelation(volunteerEntity.getUserId(), UserTagEnum.VOLUNTEER.value()); |
|
|
|
} |
|
|
|
//更新志愿者的志愿团队信息
|
|
|
|
// updateVolunteerTeam(volunteerEntity,formDTO);
|
|
|
|
updateVolunteerTeam(volunteerEntity,formDTO); |
|
|
|
// 更新志愿者标签
|
|
|
|
VolunteerTagRelationDTO tagDto = new VolunteerTagRelationDTO(); |
|
|
|
tagDto.setVolunteerId(volunteerEntity.getId()); |
|
|
@ -475,15 +481,19 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
return new Result().ok(NumConstant.ONE); |
|
|
|
} |
|
|
|
|
|
|
|
// private void updateVolunteerTeam(VolunteerInfoEntity volunteerEntity, EpdcCompleteVolunteerInfoV2FormDTO dto) {
|
|
|
|
// vlounteerTeamRealationDao.deleteByVolunteerId(volunteerEntity.getId());
|
|
|
|
// if(StringUtils.isNotBlank(dto.getTeamId())){
|
|
|
|
// VlounteerTeamRealationEntity entity = new VlounteerTeamRealationEntity();
|
|
|
|
// entity.setVolunteerId(volunteerEntity.getId());
|
|
|
|
// entity.setTeamId(dto.getTeamId());
|
|
|
|
// vlounteerTeamRealationDao.insert(entity);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
private void updateVolunteerTeam(VolunteerInfoEntity volunteerEntity, EpdcCompleteVolunteerInfoV2FormDTO dto) { |
|
|
|
vlounteerTeamRealationDao.deleteByVolunteerId(volunteerEntity.getId()); |
|
|
|
if(!CollectionUtils.isEmpty(dto.getTeamIdList())){ |
|
|
|
List<VlounteerTeamRealationEntity> entityList = new ArrayList(); |
|
|
|
for(String teamId : dto.getTeamIdList()){ |
|
|
|
VlounteerTeamRealationEntity entity = new VlounteerTeamRealationEntity(); |
|
|
|
entity.setVolunteerId(volunteerEntity.getId()); |
|
|
|
entity.setTeamId(teamId); |
|
|
|
entityList.add(entity); |
|
|
|
} |
|
|
|
vlounteerTeamRealationService.insertBatch(entityList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto) { |
|
|
|