springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/visit/EventVisitCompleteDTO.java
@@ -7,6 +7,7 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.List; /** * @author xyh @@ -48,6 +49,16 @@ private Integer eventStatus; @ApiModelProperty(value = "音频列表") List<String> vosList; @ApiModelProperty(value = "图片列表") List<String> imgList; @ApiModelProperty(value = "视频列表") List<String> videoList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/visit/EventVisitingTasksDetailsVO.java
@@ -134,13 +134,13 @@ private Date updateAt; @ApiModelProperty(value = "音频列表") List<EventResourceVO> vosList; List<String> vosList; @ApiModelProperty(value = "图片列表") List<EventResourceVO> imgList; List<String> imgList; @ApiModelProperty(value = "视频列表") List<EventResourceVO> videoList; List<String> videoList; } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventResourceMapper.java
@@ -31,5 +31,5 @@ */ IPage<EventResourceVO> findByPage(Page page, @Param("pageEventResourceDTO")PageEventResourceDTO pageEventResourceDTO); List<EventResourceVO> findListByRefId(@Param("id")Long id,@Param("classification")Integer classification,@Param("type")Integer type); List<String> findListByRefId(@Param("id")Long id,@Param("classification")Integer classification,@Param("type")Integer type); } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventVisitingTasksServiceImpl.java
@@ -305,6 +305,22 @@ }else{ taskCompleteDTO.setEventStatus(EventTasksStatusEnum.YC.getCode()); } if(!CollectionUtils.isEmpty(taskCompleteDTO.getImgList())){ taskCompleteDTO.getImgList().forEach(e->{ createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,1,e); }); } if(!CollectionUtils.isEmpty(taskCompleteDTO.getVosList())){ taskCompleteDTO.getVosList().forEach(e->{ createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,2,e); }); } if(!CollectionUtils.isEmpty(taskCompleteDTO.getVideoList())){ taskCompleteDTO.getVosList().forEach(e->{ createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,3,e); }); } int rt = eventVisitingTasksMapper.complete(taskCompleteDTO); if(rt > 0){ return R.ok(); @@ -312,4 +328,14 @@ return R.fail(); } private void createResource(Long id, Long dellUserId, int classification, int type,String url) { EventResourceDO eventResourceDO = new EventResourceDO(); eventResourceDO.setRefId(id); eventResourceDO.setClassification(classification); eventResourceDO.setType(type); eventResourceDO.setCreateBy(dellUserId); eventResourceDO.setUrl(url); eventResourceMapper.insert(eventResourceDO); } } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventResourceMapper.xml
@@ -66,8 +66,7 @@ </select> <select id="findListByRefId" resultType="com.panzhihua.common.model.vos.grid.EventResourceVO"> SELECT <include refid="columns" /> FROM event_resource SELECT url FROM event_resource where ref_id = #{id} and classification = #{classification} and type = #{type} order by id desc </select> </mapper>