Browse Source

修改切换BUG修复

anderx 3 years ago
parent
commit
9150f5f1f1

+ 17 - 4
src/main/java/com/goafanti/common/mapper/PublicReleaseDetailsMapper.xml

@@ -17,10 +17,11 @@
     <result column="clock_in_remarks" jdbcType="VARCHAR" property="clockInRemarks" />
     <result column="duration" jdbcType="DOUBLE" property="duration" />
     <result column="main_status" jdbcType="INTEGER" property="mainStatus" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
   <sql id="Base_Column_List">
     id, prid, `uid`, ufid, new_user, sign_sum, longitude, latitude, clock_in, clock_in_time,
-    photo_url, district_name, clock_in_remarks, duration, main_status
+    photo_url, district_name, clock_in_remarks, duration, main_status, update_time
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -37,12 +38,14 @@
       new_user, sign_sum, longitude,
       latitude, clock_in, clock_in_time,
       photo_url, district_name, clock_in_remarks,
-      duration, main_status)
+      duration, main_status, update_time
+      )
     values (#{prid,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR},
       #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER}, #{longitude,jdbcType=VARCHAR},
       #{latitude,jdbcType=VARCHAR}, #{clockIn,jdbcType=INTEGER}, #{clockInTime,jdbcType=TIMESTAMP},
       #{photoUrl,jdbcType=VARCHAR}, #{districtName,jdbcType=VARCHAR}, #{clockInRemarks,jdbcType=VARCHAR},
-      #{duration,jdbcType=DOUBLE}, #{mainStatus,jdbcType=INTEGER})
+      #{duration,jdbcType=DOUBLE}, #{mainStatus,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicReleaseDetails" useGeneratedKeys="true">
     insert into public_release_details
@@ -89,6 +92,9 @@
       <if test="mainStatus != null">
         main_status,
       </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="prid != null">
@@ -133,6 +139,9 @@
       <if test="mainStatus != null">
         #{mainStatus,jdbcType=INTEGER},
       </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicReleaseDetails">
@@ -180,6 +189,9 @@
       <if test="mainStatus != null">
         main_status = #{mainStatus,jdbcType=INTEGER},
       </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -198,7 +210,8 @@
       district_name = #{districtName,jdbcType=VARCHAR},
       clock_in_remarks = #{clockInRemarks,jdbcType=VARCHAR},
       duration = #{duration,jdbcType=DOUBLE},
-      main_status = #{mainStatus,jdbcType=INTEGER}
+      main_status = #{mainStatus,jdbcType=INTEGER},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=INTEGER}
   </update>
 

+ 13 - 0
src/main/java/com/goafanti/common/model/PublicReleaseDetails.java

@@ -80,6 +80,11 @@ public class PublicReleaseDetails implements Serializable {
      */
     private Integer mainStatus;
 
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -201,4 +206,12 @@ public class PublicReleaseDetails implements Serializable {
     public void setMainStatus(Integer mainStatus) {
         this.mainStatus = mainStatus;
     }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
 }

+ 5 - 0
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -86,6 +86,11 @@ public class AdminReleaseApiController extends CertifyApiController{
 		return res;
 	}
 
+	/**
+	 * 修改打卡地址
+	 * @param in
+	 * @return
+	 */
 	@RequestMapping(value = "/updateLocation", method = RequestMethod.POST)
 	public Result updateLocation(InputPublicRelease in){
 		Result res = new Result();