Просмотр исходного кода

Merge branch 'dev-lqc' into test

lqc 4 лет назад
Родитель
Сommit
9ce72d2c0c

+ 2 - 1
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashScheduleTaskListMapper.xml

@@ -7,6 +7,7 @@
         <id column="id" property="id" />
         <result column="schedule_id" property="scheduleId" />
         <result column="template_id" property="templateId" />
+        <result column="task_id" property="taskId" />
         <result column="group_id" property="groupId" />
         <result column="task_type" property="taskType" />
         <result column="remark" property="remark" />
@@ -25,7 +26,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, schedule_id, template_id, group_id, task_type, remark, task_content, status, err_info, send_time, create_uid, update_uid, create_at, update_at
+        id, schedule_id, template_id, task_id, group_id, task_type, remark, task_content, status, err_info, send_time, create_uid, update_uid, create_at, update_at
     </sql>
     <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList">
         SELECT

+ 50 - 22
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxCashScheduleTaskList.java

@@ -1,11 +1,13 @@
 package com.mokamrp.privates.mapper.pangu.pojo;
 
-import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+
 import java.io.Serializable;
+import java.time.LocalDateTime;
 
 /**
  * <p>
@@ -23,7 +25,7 @@ public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTask
     /**
      * id
      */
-      @TableId(value = "id", type = IdType.AUTO)
+    @TableId(value = "id", type = IdType.AUTO)
     private Integer id;
 
     /**
@@ -37,6 +39,11 @@ public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTask
     private Integer templateId;
 
     /**
+     * 任务id
+     */
+    private Integer taskId;
+
+    /**
      * 组别id
      */
     private Integer groupId;
@@ -107,6 +114,9 @@ public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTask
      */
     private LocalDateTime updateAt;
 
+    @TableField(exist = false)
+    private FosterwxCashTaskList fosterwxCashTaskList;
+
 
     public Integer getId() {
         return id;
@@ -132,6 +142,14 @@ public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTask
         this.templateId = templateId;
     }
 
+    public Integer getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(Integer taskId) {
+        this.taskId = taskId;
+    }
+
     public Integer getGroupId() {
         return groupId;
     }
@@ -244,6 +262,15 @@ public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTask
         this.updateAt = updateAt;
     }
 
+
+    public FosterwxCashTaskList getFosterwxCashTaskList() {
+        return fosterwxCashTaskList;
+    }
+
+    public void setFosterwxCashTaskList(FosterwxCashTaskList fosterwxCashTaskList) {
+        this.fosterwxCashTaskList = fosterwxCashTaskList;
+    }
+
     @Override
     protected Serializable pkVal() {
         return this.id;
@@ -252,23 +279,24 @@ public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTask
     @Override
     public String toString() {
         return "FosterwxCashScheduleTaskList{" +
-        "id=" + id +
-        ", scheduleId=" + scheduleId +
-        ", templateId=" + templateId +
-        ", groupId=" + groupId +
-        ", taskType=" + taskType +
-        ", remark=" + remark +
-        ", taskContent=" + taskContent +
-        ", ghId=" + ghId +
-        ", status=" + status +
-        ", type=" + type +
-        ", errInfo=" + errInfo +
-        ", sendTime=" + sendTime +
-        ", createUid=" + createUid +
-        ", createUser=" + createUser +
-        ", updateUid=" + updateUid +
-        ", createAt=" + createAt +
-        ", updateAt=" + updateAt +
-        "}";
+                "id=" + id +
+                ", scheduleId=" + scheduleId +
+                ", templateId=" + templateId +
+                ", taskId=" + taskId +
+                ", groupId=" + groupId +
+                ", taskType=" + taskType +
+                ", remark=" + remark +
+                ", taskContent=" + taskContent +
+                ", ghId=" + ghId +
+                ", status=" + status +
+                ", type=" + type +
+                ", errInfo=" + errInfo +
+                ", sendTime=" + sendTime +
+                ", createUid=" + createUid +
+                ", createUser=" + createUser +
+                ", updateUid=" + updateUid +
+                ", createAt=" + createAt +
+                ", updateAt=" + updateAt +
+                "}";
     }
 }

+ 1 - 0
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxCashAccountScheduleServiceImpl.java

@@ -88,6 +88,7 @@ public class FosterwxCashAccountScheduleServiceImpl extends ServiceImpl<Fosterwx
                 FosterwxCashScheduleTaskList fosterwxCashScheduleTaskList = new FosterwxCashScheduleTaskList();
                 fosterwxCashScheduleTaskList.setScheduleId(fosterwxCashAccountSchedule.getId());
                 fosterwxCashScheduleTaskList.setTemplateId(fosterwxCashAccountSchedule.getTemplateId());
+                fosterwxCashScheduleTaskList.setTaskId(fosterwxCashTaskList.getId());
                 fosterwxCashScheduleTaskList.setGroupId(fosterwxCashAccountSchedule.getGroupId());
                 fosterwxCashScheduleTaskList.setTaskType(fosterwxCashTaskList.getTaskType());
                 fosterwxCashScheduleTaskList.setRemark(fosterwxCashTaskList.getRemark());

+ 11 - 1
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxCashScheduleTaskListServiceImpl.java

@@ -1,5 +1,6 @@
 package com.mokamrp.privates.service.pangu.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.mokamrp.privates.entity.ResHandle;
@@ -7,6 +8,8 @@ import com.mokamrp.privates.entity.pangu.FosterwxCashScheduleTaskListHandle;
 import com.mokamrp.privates.mapper.pangu.FosterwxCashScheduleTaskListMapper;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
 import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskListService;
+import com.mokamrp.privates.service.pangu.FosterwxCashTaskListService;
+import com.mokamrp.privates.utils.pangu.redis.task.TaskRedis;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -27,6 +30,12 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
     @Autowired
     public FosterwxCashScheduleTaskListMapper fosterwxCashScheduleTaskListMapper;
 
+    @Autowired
+    public TaskRedis taskRedis;
+
+    @Autowired
+    public FosterwxCashTaskListService fosterwxCashTaskListService;
+
     /**
      * 获取数据列表 支持分页
      * @param handle
@@ -86,9 +95,10 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
         fosterwxCashScheduleTaskList.setErrInfo("");
 
         fosterwxCashScheduleTaskListMapper.updateById(fosterwxCashScheduleTaskList);
-        //TODO 等typer接口
 
+        fosterwxCashScheduleTaskList.setFosterwxCashTaskList(fosterwxCashTaskListService.getById(fosterwxCashScheduleTaskList.getTaskId()));
 
+        taskRedis.createUrlByTyper(JSON.toJSONString(fosterwxCashScheduleTaskList));
     }
 
     /**