|
|
@ -33,6 +33,7 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.constant.UserFieldConsant; |
|
|
|
import com.elink.esua.epdc.constant.VolunteerInfoNoticeConstant; |
|
|
|
import com.elink.esua.epdc.dao.VlounteerTeamRealationDao; |
|
|
|
import com.elink.esua.epdc.dao.VolunteerInfoDao; |
|
|
|
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.UserTagDTO; |
|
|
@ -44,6 +45,7 @@ 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; |
|
|
@ -78,6 +80,9 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
@Autowired |
|
|
|
private VolunteerTagRelationService volunteerTagRelationService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private VlounteerTeamRealationDao vlounteerTeamRealationDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据查询条件,返回首页 志愿者信息列表 |
|
|
|
* |
|
|
@ -456,6 +461,8 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
this.sendNotice(volunteerEntity); |
|
|
|
userTagRelationService.addUserTagRelation(volunteerEntity.getUserId(), UserTagEnum.VOLUNTEER.value()); |
|
|
|
} |
|
|
|
//更新志愿者的志愿团队信息
|
|
|
|
updateVolunteerTeam(volunteerEntity,dto); |
|
|
|
// 更新志愿者标签
|
|
|
|
VolunteerTagRelationDTO tagDto = new VolunteerTagRelationDTO(); |
|
|
|
tagDto.setVolunteerId(volunteerEntity.getId()); |
|
|
@ -465,6 +472,16 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
return new Result().ok(NumConstant.ONE); |
|
|
|
} |
|
|
|
|
|
|
|
private void updateVolunteerTeam(VolunteerInfoEntity volunteerEntity, VolunteerInfoDTO 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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto) { |
|
|
|
baseDao.updateKindnessTime(formDto); |
|
|
|