ouyj 2 mesi fa
parent
commit
d56f6259e2

+ 18 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/GxtOrderScoreDetail.java

@@ -1,6 +1,9 @@
 package com.ygtx.gxt.domain;
 
 import java.math.BigDecimal;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ygtx.common.annotation.Excel;
@@ -63,6 +66,10 @@ public class GxtOrderScoreDetail extends BaseEntity
     @Excel(name = "状态")
     private Integer status;
 
+    /** 创建时间(真实) */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTimeReal;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -183,6 +190,16 @@ public class GxtOrderScoreDetail extends BaseEntity
         return status;
     }
 
+    public void setCreateTimeReal(Date createTimeReal) 
+    {
+        this.createTimeReal = createTimeReal;
+    }
+
+    public Date getCreateTimeReal() 
+    {
+        return createTimeReal;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -198,6 +215,7 @@ public class GxtOrderScoreDetail extends BaseEntity
             .append("runScore", getRunScore())
             .append("stopScore", getStopScore())
             .append("status", getStatus())
+            .append("createTimeReal", getCreateTimeReal())
             .append("createBy", getCreateBy())
             .append("createTime", getCreateTime())
             .append("updateBy", getUpdateBy())

+ 1 - 3
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtOrderScoreDetailServiceImpl.java

@@ -53,9 +53,7 @@ public class GxtOrderScoreDetailServiceImpl implements IGxtOrderScoreDetailServi
     @Override
     public int insertGxtOrderScoreDetail(GxtOrderScoreDetail gxtOrderScoreDetail)
     {
-        if(gxtOrderScoreDetail.getCreateTime() == null){
-            gxtOrderScoreDetail.setCreateTime(DateUtils.getNowDate());
-        }
+        gxtOrderScoreDetail.setCreateTimeReal(DateUtils.getNowDate());
         return gxtOrderScoreDetailMapper.insertGxtOrderScoreDetail(gxtOrderScoreDetail);
     }
 

+ 6 - 1
ygtx-gxt/src/main/resources/mapper/gxt/GxtOrderScoreDetailMapper.xml

@@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="runScore"    column="run_score"    />
         <result property="stopScore"    column="stop_score"    />
         <result property="status"    column="status"    />
+        <result property="createTimeReal"    column="create_time_real"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
@@ -25,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectGxtOrderScoreDetailVo">
-        select id, user_id, nick_name, order_type, order_id, order_code, score_type, score, rate_score, run_score, stop_score, status, create_by, create_time, update_by, update_time, remark from gxt_order_score_detail
+        select id, user_id, nick_name, order_type, order_id, order_code, score_type, score, rate_score, run_score, stop_score, status, create_time_real, create_by, create_time, update_by, update_time, remark from gxt_order_score_detail
     </sql>
 
     <select id="selectGxtOrderScoreDetailList" parameterType="GxtOrderScoreDetail" resultMap="GxtOrderScoreDetailResult">
@@ -42,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="runScore != null "> and run_score = #{runScore}</if>
             <if test="stopScore != null "> and stop_score = #{stopScore}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="createTimeReal != null "> and create_time_real = #{createTimeReal}</if>
         </where>
     </select>
     
@@ -64,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="runScore != null">run_score,</if>
             <if test="stopScore != null">stop_score,</if>
             <if test="status != null">status,</if>
+            <if test="createTimeReal != null">create_time_real,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
@@ -82,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="runScore != null">#{runScore},</if>
             <if test="stopScore != null">#{stopScore},</if>
             <if test="status != null">#{status},</if>
+            <if test="createTimeReal != null">#{createTimeReal},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -104,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="runScore != null">run_score = #{runScore},</if>
             <if test="stopScore != null">stop_score = #{stopScore},</if>
             <if test="status != null">status = #{status},</if>
+            <if test="createTimeReal != null">create_time_real = #{createTimeReal},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>