springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoVO.java
@@ -211,4 +211,7 @@ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date evaluateDate; @ApiModelProperty(value = "微心愿分配人员集合") private List<ComActMicroWishHandleVO> handleList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMicroWishHandleVO.java
New file @@ -0,0 +1,21 @@ package com.panzhihua.common.model.vos.community; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @author lyq * 微心愿处理人请求参数 */ @Data @ApiModel("微心愿处理人请求参数") public class ComActMicroWishHandleVO { @ApiModelProperty("用户id") private Long userId; @ApiModelProperty("处理人类型(1.后台用户 2.党员 3.志愿者 4.社工 5.四长四员)") private Integer type; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMicroWishVO.java
@@ -168,6 +168,9 @@ @ApiModelProperty(value = "微心愿分配人id集合") private List<Long> handleIds; @ApiModelProperty(value = "微心愿分配人员集合") private List<ComActMicroWishHandleVO> handleList; @ApiModelProperty(value = "微心愿处理人id,多个以逗号隔开") private String handleId; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActEasyPhotoHandler.java
@@ -37,7 +37,12 @@ * 业务类型(1.随手拍 2.微心愿) */ private Integer serviceType; /** * 业务分类(1.随手拍 2.微心愿) */ public interface ServiceType{ int SSP = 1; int WXY = 2; } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoHandlerService.java
@@ -75,4 +75,14 @@ */ R queryByList(PageComActEasyPhotoHandlerDto comActEasyPhotoHandler); /** * 添加随手拍、微心愿处理关联记录 * @param communityId 社区id * @param userId 用户id * @param serviceId 业务id * @param type 人员类型(1.后台用户 2.党员 3.志愿者 4.社工 5.四长四员) * @param serviceType 业务类型(1.随手拍 2.微心愿) */ void addHandleRecord(Long communityId,Long userId,Long serviceId,Integer type,Integer serviceType); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoHandlerServiceImpl.java
@@ -116,4 +116,23 @@ public R queryByList(PageComActEasyPhotoHandlerDto comActEasyPhotoHandler) { return R.ok(this.baseMapper.queryAllByList(comActEasyPhotoHandler)); } /** * 添加随手拍、微心愿处理关联记录 * @param communityId 社区id * @param userId 用户id * @param serviceId 业务id * @param type 人员类型(1.后台用户 2.党员 3.志愿者 4.社工 5.四长四员) * @param serviceType 业务类型(1.随手拍 2.微心愿) */ @Override public void addHandleRecord(Long communityId, Long userId, Long serviceId, Integer type, Integer serviceType) { ComActEasyPhotoHandler easyPhotoHandler = new ComActEasyPhotoHandler(); easyPhotoHandler.setCommunityId(communityId); easyPhotoHandler.setUserId(userId); easyPhotoHandler.setServiceId(serviceId); easyPhotoHandler.setType(type); easyPhotoHandler.setServiceType(serviceType); this.baseMapper.insert(easyPhotoHandler); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -8,7 +8,9 @@ import javax.annotation.Resource; import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; import com.panzhihua.service_community.entity.ComActEasyPhotoHandler; import com.panzhihua.service_community.entity.SysTemplateConfig; import com.panzhihua.service_community.service.ComActEasyPhotoHandlerService; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -73,6 +75,8 @@ private ComActActivityDAO comActActivityDAO; @Resource private SysTemplateConfigDao sysTemplateConfigDao; @Resource private ComActEasyPhotoHandlerService easyPhotoHandlerService; /** * 分页查询随手拍 * @@ -312,6 +316,14 @@ // 审核通过判断随手拍是否有活动并计算用户收益 comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(), comActEasyPhotoVO.getId(), comActEasyPhotoVO.getUserId(), BigDecimal.ZERO); //添加分配人员 if(comActEasyPhotoVO.getHandleList() != null && comActEasyPhotoVO.getHandleList().size() > 0){ comActEasyPhotoVO.getHandleList().forEach(handle -> { easyPhotoHandlerService.addHandleRecord(cmActEasyPhotoDO.getCommunityId(),comActEasyPhotoVO.getUserId() ,cmActEasyPhotoDO.getId(),handle.getType(), ComActEasyPhotoHandler.ServiceType.SSP); }); } break; case 2: // if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java
@@ -21,10 +21,12 @@ import com.panzhihua.service_community.dao.ComActMicroWishFeedbackMapper; import com.panzhihua.service_community.dao.ComActMicroWishOperationRecordMapper; import com.panzhihua.service_community.dao.ComActMicroWishUserDAO; import com.panzhihua.service_community.entity.ComActEasyPhotoHandler; import com.panzhihua.service_community.model.dos.ComActMicroWishDO; import com.panzhihua.service_community.model.dos.ComActMicroWishFeedbackDO; import com.panzhihua.service_community.model.dos.ComActMicroWishOperationRecordDO; import com.panzhihua.service_community.model.dos.ComActMicroWishUserDO; import com.panzhihua.service_community.service.ComActEasyPhotoHandlerService; import com.panzhihua.service_community.service.ComActMicroWishOperationRecordService; import com.panzhihua.service_community.service.ComActMicroWishService; import lombok.extern.slf4j.Slf4j; @@ -56,6 +58,8 @@ private ComActMicroWishOperationRecordMapper comActMicroWishOperationRecordMapper; @Resource private ComActMicroWishOperationRecordService wishOperationRecordService; @Resource private ComActEasyPhotoHandlerService easyPhotoHandlerService; /** * 分页查询微心愿 * @@ -244,6 +248,14 @@ comActMicroWishOperationRecordDO.setRemark("分配心愿"); comActMicroWishOperationRecordDO.setUserId(responsibleId); comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); //添加分配人员 if(comActMicroWishVO.getHandleList() != null && comActMicroWishVO.getHandleList().size() > 0){ comActMicroWishVO.getHandleList().forEach(handle -> { easyPhotoHandlerService.addHandleRecord(microWishDO.getCommunityId(),comActMicroWishVO.getUserId() ,microWishDO.getId(),handle.getType(), ComActEasyPhotoHandler.ServiceType.WXY); }); } break; case 4: isUpdate = true;