| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.community.GrantIntegral; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.VolunteerActivitiesPeopleDao; |
| | | import com.panzhihua.service_community.entity.SysUser; |
| | | import com.panzhihua.service_community.entity.VolunteerActivitiesPeople; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerMngService; |
| | | import com.panzhihua.service_community.service.VolunteerActivitiesPeopleService; |
| | | import com.panzhihua.service_community.service.VolunteerActivityService; |
| | | import com.panzhihua.service_community.service.VolunteerIntegralRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | public class VolunteerActivitiesPeopleServiceImpl extends ServiceImpl<VolunteerActivitiesPeopleDao, |
| | | VolunteerActivitiesPeople> implements VolunteerActivitiesPeopleService |
| | | { |
| | | |
| | | @Resource |
| | | private ComMngVolunteerMngService comMngVolunteerMngService; |
| | | |
| | | @Resource |
| | | private VolunteerActivityService volunteerActivityService; |
| | | |
| | | @Resource |
| | | private VolunteerIntegralRecordService volunteerIntegralRecordService; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | |
| | | @Override |
| | |
| | | vla.setIssueStatus("1"); |
| | | baseMapper.vapUpdate(vla); |
| | | |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | comMngVolunteerMngVO.setId(Long.valueOf(item.getVolunteerId())); |
| | | |
| | | LoginUserInfoVO sysUser=userService.getUserInfoByUserId(item.getUserId()).getData(); |
| | | int grant=0; |
| | | if(!StringUtils.isNotEmpty(comMngVolunteerMngVO.getLoveIntegral())) |
| | | if(!StringUtils.isNotEmpty(sysUser.getLoveIntegral())) |
| | | { |
| | | grant=Integer.valueOf(comMngVolunteerMngVO.getLoveIntegral()); |
| | | grant=Integer.valueOf(sysUser.getLoveIntegral()); |
| | | } |
| | | grant+=Integer.valueOf(item.getGrantIntegral()); |
| | | sysUser.setLoveIntegral(grant+""); |
| | | userService.putUser(sysUser); |
| | | |
| | | comMngVolunteerMngVO.setLoveIntegral(grant+""); |
| | | //新增积分记录 |
| | | VolunteerIntegralRecordVO volunteerIntegralRecordVO=new VolunteerIntegralRecordVO(); |
| | | volunteerIntegralRecordVO.setIntegral(item.getGrantIntegral()); |
| | | volunteerIntegralRecordVO.setVolunteerId(item.getVolunteerId()); |
| | | volunteerIntegralRecordVO.setUserId(item.getUserId()); |
| | | volunteerIntegralRecordVO.setIType("1"); |
| | | volunteerIntegralRecordService.insertVolunteer(volunteerIntegralRecordVO); |
| | | |
| | | comMngVolunteerMngService.putVolunteer(comMngVolunteerMngVO); |
| | | |
| | | } |
| | | |