Browse Source

项目暂停接口开发

anderx 3 years ago
parent
commit
92ab51a98c

+ 33 - 21
src/main/java/com/goafanti/common/mapper/TaskSoptMapper.xml

@@ -3,14 +3,15 @@
 <mapper namespace="com.goafanti.common.dao.TaskSoptMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskSopt">
     <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="tid" jdbcType="INTEGER" property="tid" />
     <result column="type" jdbcType="INTEGER" property="type" />
     <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="reason" jdbcType="VARCHAR" property="reason" />
     <result column="create_by" jdbcType="VARCHAR" property="createBy" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="tid" jdbcType="INTEGER" property="tid" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, `type`, `status`, create_by, create_time, tid
+    id, tid, `type`, `status`, reason, create_by, create_time
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -18,91 +19,102 @@
     from task_sopt
     where id = #{id,jdbcType=BIGINT}
   </select>
-
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from task_sopt
     where id = #{id,jdbcType=BIGINT}
   </delete>
   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskSopt" useGeneratedKeys="true">
-    insert into task_sopt (`type`, `status`, create_by,
-      create_time, tid)
-    values (#{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
-      #{createTime,jdbcType=TIMESTAMP}, #{tid,jdbcType=INTEGER})
+    insert into task_sopt (tid, `type`, `status`,
+      reason, create_by, create_time
+      )
+    values (#{tid,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
+      #{reason,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskSopt" useGeneratedKeys="true">
     insert into task_sopt
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="tid != null">
+        tid,
+      </if>
       <if test="type != null">
         `type`,
       </if>
       <if test="status != null">
         `status`,
       </if>
+      <if test="reason != null">
+        reason,
+      </if>
       <if test="createBy != null">
         create_by,
       </if>
       <if test="createTime != null">
         create_time,
       </if>
-      <if test="tid != null">
-        tid,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="tid != null">
+        #{tid,jdbcType=INTEGER},
+      </if>
       <if test="type != null">
         #{type,jdbcType=INTEGER},
       </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
+      <if test="reason != null">
+        #{reason,jdbcType=VARCHAR},
+      </if>
       <if test="createBy != null">
         #{createBy,jdbcType=VARCHAR},
       </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="tid != null">
-        #{tid,jdbcType=INTEGER},
-      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskSopt">
     update task_sopt
     <set>
+      <if test="tid != null">
+        tid = #{tid,jdbcType=INTEGER},
+      </if>
       <if test="type != null">
         `type` = #{type,jdbcType=INTEGER},
       </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
+      <if test="reason != null">
+        reason = #{reason,jdbcType=VARCHAR},
+      </if>
       <if test="createBy != null">
         create_by = #{createBy,jdbcType=VARCHAR},
       </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="tid != null">
-        tid = #{tid,jdbcType=INTEGER},
-      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TaskSopt">
     update task_sopt
-    set `type` = #{type,jdbcType=INTEGER},
+    set tid = #{tid,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER},
       `status` = #{status,jdbcType=INTEGER},
+      reason = #{reason,jdbcType=VARCHAR},
       create_by = #{createBy,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      tid = #{tid,jdbcType=INTEGER}
+      create_time = #{createTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
 
   <insert id="insertList">
-    insert into task_sopt (`type`, `status`,tid, create_by,
+    insert into task_sopt (`type`, `status`,tid, create_by,reason
     create_time)
     values
     <foreach item="item" collection="list" separator="," index="">
-      (#{item.type,jdbcType=INTEGER}, #{item.status,jdbcType=INTEGER},#{item.tid,jdbcType=INTEGER},
+      (#{item.type,jdbcType=INTEGER}, #{item.status,jdbcType=INTEGER},#{item.tid,jdbcType=INTEGER},#{reason,jdbcType=VARCHAR},
           #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP})
     </foreach>
   </insert>

+ 26 - 13
src/main/java/com/goafanti/common/model/TaskSopt.java

@@ -11,6 +11,11 @@ public class TaskSopt implements Serializable {
     private Long id;
 
     /**
+     * 任务编号
+     */
+    private Integer tid;
+
+    /**
      * 类型 0=项目暂停,1=项目重启
      */
     private Integer type;
@@ -21,6 +26,11 @@ public class TaskSopt implements Serializable {
     private Integer status;
 
     /**
+     * 原因
+     */
+    private String reason;
+
+    /**
      * 创建者
      */
     private String createBy;
@@ -30,11 +40,6 @@ public class TaskSopt implements Serializable {
      */
     private Date createTime;
 
-    /**
-     * 任务编号
-     */
-    private Integer tid;
-
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -45,6 +50,14 @@ public class TaskSopt implements Serializable {
         this.id = id;
     }
 
+    public Integer getTid() {
+        return tid;
+    }
+
+    public void setTid(Integer tid) {
+        this.tid = tid;
+    }
+
     public Integer getType() {
         return type;
     }
@@ -61,6 +74,14 @@ public class TaskSopt implements Serializable {
         this.status = status;
     }
 
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
     public String getCreateBy() {
         return createBy;
     }
@@ -76,12 +97,4 @@ public class TaskSopt implements Serializable {
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
-
-    public Integer getTid() {
-        return tid;
-    }
-
-    public void setTid(Integer tid) {
-        this.tid = tid;
-    }
 }