Commit f784ff31 authored by 王飞's avatar 王飞

Feat

1、重构场景变更通知命名。

Reference N/A
parent 65b467da
...@@ -9,14 +9,14 @@ import lombok.Data; ...@@ -9,14 +9,14 @@ import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
/** /**
* 体系审查任务收件箱(目前用来获取审查场景变更通知) * 审查问卷任务收件箱(目前用来获取审查场景变更通知)
* @TableName t_system_review_task_inbox * @TableName t_review_task_inbox
*/ */
@ApiModel @ApiModel
@TableName(value ="t_system_review_task_inbox") @TableName(value ="t_system_review_task_inbox")
@Accessors(chain = true) @Accessors(chain = true)
@Data @Data
public class SystemReviewTaskInbox { public class ReviewTaskInbox {
/** /**
* 主键 * 主键
*/ */
...@@ -28,7 +28,7 @@ public class SystemReviewTaskInbox { ...@@ -28,7 +28,7 @@ public class SystemReviewTaskInbox {
* 体系审查任务id * 体系审查任务id
*/ */
@ApiModelProperty("体系审查任务id") @ApiModelProperty("体系审查任务id")
private Long systemReviewTaskId; private Long reviewTaskId;
/** /**
* 场景变更任务id * 场景变更任务id
......
package com.ruoyi.mapper; package com.ruoyi.mapper;
import com.ruoyi.domain.SystemReviewTaskInbox; import com.ruoyi.domain.ReviewTaskInbox;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @createDate 2023-12-26 09:55:39 * @createDate 2023-12-26 09:55:39
* @Entity com.ruoyi.domain.SystemReviewTaskInbox * @Entity com.ruoyi.domain.SystemReviewTaskInbox
*/ */
public interface SystemReviewTaskInboxMapper extends BaseMapper<SystemReviewTaskInbox> { public interface ReviewTaskInboxMapper extends BaseMapper<ReviewTaskInbox> {
} }
......
package com.ruoyi.service; package com.ruoyi.service;
import com.ruoyi.domain.SystemReviewTaskInbox; import com.ruoyi.domain.ReviewTaskInbox;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
/** /**
...@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @description 针对表【t_system_review_task_inbox(体系审查任务收件箱(目前用来获取审查场景变更通知))】的数据库操作Service * @description 针对表【t_system_review_task_inbox(体系审查任务收件箱(目前用来获取审查场景变更通知))】的数据库操作Service
* @createDate 2023-12-26 09:55:39 * @createDate 2023-12-26 09:55:39
*/ */
public interface SystemReviewTaskInboxService extends IService<SystemReviewTaskInbox> { public interface ReviewTaskInboxService extends IService<ReviewTaskInbox> {
/** /**
* 对受变更影响的问卷生成提醒消息 * 对受变更影响的问卷生成提醒消息
......
...@@ -11,7 +11,7 @@ import com.ruoyi.service.ReviewSceneChangeTaskService; ...@@ -11,7 +11,7 @@ import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.mapper.ReviewSceneChangeTaskMapper; import com.ruoyi.mapper.ReviewSceneChangeTaskMapper;
import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService; import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService;
import com.ruoyi.service.ReviewSceneService; import com.ruoyi.service.ReviewSceneService;
import com.ruoyi.service.SystemReviewTaskInboxService; import com.ruoyi.service.ReviewTaskInboxService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse; import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -44,7 +44,7 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -44,7 +44,7 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
private ReviewSceneService reviewSceneService; private ReviewSceneService reviewSceneService;
@Autowired @Autowired
private SystemReviewTaskInboxService systemReviewTaskInboxService; private ReviewTaskInboxService reviewTaskInboxService;
@Autowired @Autowired
private ReviewSceneChangeTaskMapper reviewSceneChangeTaskMapper; private ReviewSceneChangeTaskMapper reviewSceneChangeTaskMapper;
...@@ -129,7 +129,7 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -129,7 +129,7 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
reviewSceneService.change(task); reviewSceneService.change(task);
// 通知受影响的问卷 // 通知受影响的问卷
systemReviewTaskInboxService.saveNotify(taskId, task.getType()); reviewTaskInboxService.saveNotify(taskId, task.getType());
} }
} }
......
...@@ -6,10 +6,10 @@ import com.ruoyi.common.exception.ServiceException; ...@@ -6,10 +6,10 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.CarReviewTask; import com.ruoyi.domain.CarReviewTask;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.domain.SystemReviewTask; import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.domain.SystemReviewTaskInbox; import com.ruoyi.domain.ReviewTaskInbox;
import com.ruoyi.service.CarReviewTaskService; import com.ruoyi.service.CarReviewTaskService;
import com.ruoyi.service.SystemReviewTaskInboxService; import com.ruoyi.service.ReviewTaskInboxService;
import com.ruoyi.mapper.SystemReviewTaskInboxMapper; import com.ruoyi.mapper.ReviewTaskInboxMapper;
import com.ruoyi.service.SystemReviewTaskService; import com.ruoyi.service.SystemReviewTaskService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -25,7 +25,7 @@ import java.util.List; ...@@ -25,7 +25,7 @@ import java.util.List;
*/ */
@Transactional @Transactional
@Service @Service
public class SystemReviewTaskInboxServiceImpl extends ServiceImpl<SystemReviewTaskInboxMapper, SystemReviewTaskInbox> implements SystemReviewTaskInboxService { public class ReviewTaskInboxServiceImpl extends ServiceImpl<ReviewTaskInboxMapper, ReviewTaskInbox> implements ReviewTaskInboxService {
@Autowired @Autowired
private SystemReviewTaskService systemReviewTaskService; private SystemReviewTaskService systemReviewTaskService;
...@@ -60,11 +60,11 @@ public class SystemReviewTaskInboxServiceImpl extends ServiceImpl<SystemReviewTa ...@@ -60,11 +60,11 @@ public class SystemReviewTaskInboxServiceImpl extends ServiceImpl<SystemReviewTa
List<CarReviewTask> pendingTasks = carReviewTaskService.findListByReviewStatus(CarReviewTask.REVIEW_STATUS_PENDING); List<CarReviewTask> pendingTasks = carReviewTaskService.findListByReviewStatus(CarReviewTask.REVIEW_STATUS_PENDING);
// 构建并保存提醒消息 // 构建并保存提醒消息
List<SystemReviewTaskInbox> inboxes = new ArrayList(); List<ReviewTaskInbox> inboxes = new ArrayList();
for(CarReviewTask task : pendingTasks) { for(CarReviewTask task : pendingTasks) {
SystemReviewTaskInbox inbox = new SystemReviewTaskInbox() ReviewTaskInbox inbox = new ReviewTaskInbox()
.setReviewSceneChangeTaskId(reviewSceneChangeTaskId) .setReviewSceneChangeTaskId(reviewSceneChangeTaskId)
.setSystemReviewTaskId(task.getId()) .setReviewTaskId(task.getId())
.setIsConfirm(0); .setIsConfirm(0);
inboxes.add(inbox); inboxes.add(inbox);
} }
...@@ -78,11 +78,11 @@ public class SystemReviewTaskInboxServiceImpl extends ServiceImpl<SystemReviewTa ...@@ -78,11 +78,11 @@ public class SystemReviewTaskInboxServiceImpl extends ServiceImpl<SystemReviewTa
List<SystemReviewTask> pendingTasks = systemReviewTaskService.findListByStatus(SystemReviewTask.STATUS_PENDING); List<SystemReviewTask> pendingTasks = systemReviewTaskService.findListByStatus(SystemReviewTask.STATUS_PENDING);
// 构建并保存提醒消息 // 构建并保存提醒消息
List<SystemReviewTaskInbox> inboxes = new ArrayList(); List<ReviewTaskInbox> inboxes = new ArrayList();
for(SystemReviewTask task : pendingTasks) { for(SystemReviewTask task : pendingTasks) {
SystemReviewTaskInbox inbox = new SystemReviewTaskInbox() ReviewTaskInbox inbox = new ReviewTaskInbox()
.setReviewSceneChangeTaskId(reviewSceneChangeTaskId) .setReviewSceneChangeTaskId(reviewSceneChangeTaskId)
.setSystemReviewTaskId(task.getId()) .setReviewTaskId(task.getId())
.setIsConfirm(0); .setIsConfirm(0);
inboxes.add(inbox); inboxes.add(inbox);
} }
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.mapper.SystemReviewTaskInboxMapper"> <mapper namespace="com.ruoyi.mapper.ReviewTaskInboxMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.SystemReviewTaskInbox"> <resultMap id="BaseResultMap" type="com.ruoyi.domain.ReviewTaskInbox">
<id property="id" column="id" jdbcType="BIGINT"/> <id property="id" column="id" jdbcType="BIGINT"/>
<result property="systemReviewTaskId" column="system_review_task_id" jdbcType="BIGINT"/> <result property="reviewTaskId" column="review_task_id" jdbcType="BIGINT"/>
<result property="reviewSceneChangeTaskId" column="review_scene_change_task_id" jdbcType="BIGINT"/> <result property="reviewSceneChangeTaskId" column="review_scene_change_task_id" jdbcType="BIGINT"/>
<result property="isConfirm" column="is_confirm" jdbcType="TINYINT"/> <result property="isConfirm" column="is_confirm" jdbcType="TINYINT"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id,system_review_task_id,review_scene_change_task_id, id,review_task_id,review_scene_change_task_id,is_confirm
is_confirm
</sql> </sql>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment