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

Merge branch 'test' of
ssh://git@git.jishutao.com:55555/jishutao/kede-server.git into test

Conflicts:
src/main/resources/props/config_local.properties

anderx лет назад: 7
Родитель
Сommit
a0b247d0eb

+ 0 - 1
src/main/java/com/goafanti/common/dao/TOrderMonthReportMapper.java

@@ -97,5 +97,4 @@ public interface TOrderMonthReportMapper {
 	int updateByMonth(Integer month);
 	int updateByMonth(Integer month);
 	int updateByYear();
 	int updateByYear();
 	
 	
-	int getHistory(TOrderMonthReport monthReport);
 }
 }

+ 7 - 18
src/main/java/com/goafanti/common/mapper/TOrderMonthReportMapper.xml

@@ -14,7 +14,6 @@
     <result column="proof_count" jdbcType="REAL" property="proofCount" />
     <result column="proof_count" jdbcType="REAL" property="proofCount" />
     <result column="salemans_id" jdbcType="VARCHAR" property="salemansId" />
     <result column="salemans_id" jdbcType="VARCHAR" property="salemansId" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
-    <result column="history" jdbcType="INTEGER" property="history" />
   </resultMap>
   </resultMap>
   <sql id="Example_Where_Clause">
   <sql id="Example_Where_Clause">
     <!--
     <!--
@@ -90,7 +89,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Tue Nov 27 14:53:14 CST 2018.
       This element was generated on Tue Nov 27 14:53:14 CST 2018.
     -->
     -->
-    id, type, month, amount, proof_count, salemans_id, update_time, history
+    id, type, month, amount, proof_count, salemans_id, update_time
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderMonthReportExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderMonthReportExample" resultMap="BaseResultMap">
     <!--
     <!--
@@ -150,10 +149,10 @@
     -->
     -->
     insert into t_order_month_report (id, type, month, 
     insert into t_order_month_report (id, type, month, 
       amount, proof_count, salemans_id, 
       amount, proof_count, salemans_id, 
-      update_time, history)
+      update_time)
     values (#{id,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{month,jdbcType=INTEGER}, 
     values (#{id,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{month,jdbcType=INTEGER}, 
       #{amount,jdbcType=DECIMAL}, #{proofCount,jdbcType=REAL}, #{salemansId,jdbcType=VARCHAR}, 
       #{amount,jdbcType=DECIMAL}, #{proofCount,jdbcType=REAL}, #{salemansId,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{history,jdbcType=INTEGER})
+      #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderMonthReport">
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderMonthReport">
     <!--
     <!--
@@ -184,9 +183,6 @@
       <if test="updateTime != null">
       <if test="updateTime != null">
         update_time,
         update_time,
       </if>
       </if>
-      <if test="history != null">
-        history,
-      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
       <if test="id != null">
@@ -210,9 +206,6 @@
       <if test="updateTime != null">
       <if test="updateTime != null">
         #{updateTime,jdbcType=TIMESTAMP},
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
-      <if test="history != null">
-        #{history,jdbcType=INTEGER},
-      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.TOrderMonthReportExample" resultType="java.lang.Integer">
   <select id="countByExample" parameterType="com.goafanti.common.model.TOrderMonthReportExample" resultType="java.lang.Integer">
@@ -324,8 +317,8 @@
   </update>
   </update>
    <!-- 定时插入上月的签单数据 -->
    <!-- 定时插入上月的签单数据 -->
   <insert id="insertLastMonthOrderData" parameterType="java.lang.String">
   <insert id="insertLastMonthOrderData" parameterType="java.lang.String">
-  	REPLACE INTO t_order_month_report(`type`,`month`,amount,proof_count,salemans_id,history) 
-	select o.order_type, date_format(DATE_ADD(NOW(),INTERVAL -1 MONTH),'%Y%m'),sum(o.total_amount), sum(o.proof_count), o.salesman_id , 1
+  	REPLACE INTO t_order_month_report(`type`,`month`,amount,proof_count,salemans_id) 
+	select o.order_type, date_format(DATE_ADD(NOW(),INTERVAL -1 MONTH),'%Y%m'),sum(o.total_amount), sum(o.proof_count), o.salesman_id 
 	from t_order_new o
 	from t_order_new o
 	where 1 = 1
 	where 1 = 1
 	  and o.proof_status = 1 and o.delete_sign = 0 and o.order_status &lt;&gt; 7
 	  and o.proof_status = 1 and o.delete_sign = 0 and o.order_status &lt;&gt; 7
@@ -485,8 +478,8 @@
  </insert>
  </insert>
  <!-- 更新指定月份的统计数据 -->
  <!-- 更新指定月份的统计数据 -->
  <insert id="updateByMonth" parameterType="java.lang.Integer">
  <insert id="updateByMonth" parameterType="java.lang.Integer">
- 	REPLACE INTO t_order_month_report(`type`,`month`,amount,proof_count,salemans_id,history) 
-	select o.order_type, #{month,jdbcType=INTEGER},sum(o.total_amount), sum(o.proof_count), o.salesman_id ,1
+ 	REPLACE INTO t_order_month_report(`type`,`month`,amount,proof_count,salemans_id) 
+	select o.order_type, #{month,jdbcType=INTEGER},sum(o.total_amount), sum(o.proof_count), o.salesman_id
 	from t_order_new o
 	from t_order_new o
 	where 1 = 1
 	where 1 = 1
 	  and o.proof_status = 1 and o.delete_sign = 0 and o.order_status &lt;&gt; 7
 	  and o.proof_status = 1 and o.delete_sign = 0 and o.order_status &lt;&gt; 7
@@ -500,8 +493,4 @@
 	where CAST(`month` as CHAR) like concat (year(now()),'%') 
 	where CAST(`month` as CHAR) like concat (year(now()),'%') 
 	group by m.salemans_id , m.`type`
 	group by m.salemans_id , m.`type`
  </insert>
  </insert>
- <!-- 获得历史状态 -->
- <select id="getHistory" parameterType="com.goafanti.common.model.TOrderMonthReport" resultType="java.lang.Integer">
- 	select history from t_order_month_report where salemans_id = #{salemansId,jdbcType=VARCHAR} and `type` = #{type,jdbcType=INTEGER} and `month` = #{month,jdbcType=INTEGER}
- </select>
 </mapper>
 </mapper>

+ 0 - 9
src/main/java/com/goafanti/common/model/TOrderMonthReport.java

@@ -41,8 +41,6 @@ public class TOrderMonthReport {
 	 */
 	 */
 	private Date updateTime;
 	private Date updateTime;
 	
 	
-	private Integer history;
-
 	/**
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.id
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_month_report.id
 	 * @return  the value of t_order_month_report.id
 	 * @return  the value of t_order_month_report.id
@@ -169,11 +167,4 @@ public class TOrderMonthReport {
 		this.updateTime = updateTime;
 		this.updateTime = updateTime;
 	}
 	}
 
 
-	public Integer getHistory() {
-		return history;
-	}
-
-	public void setHistory(Integer history) {
-		this.history = history;
-	}
 }
 }

+ 3 - 12
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -454,18 +454,9 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		int sm = cal.get(Calendar.MONTH);
 		int sm = cal.get(Calendar.MONTH);
 		Integer month = sy*100+(sm+1);
 		Integer month = sy*100+(sm+1);
 		
 		
-		
-		TOrderMonthReport monthReport = new TOrderMonthReport();
-		monthReport.setSalemansId(new1.getSalesmanId());
-		monthReport.setType(new1.getOrderType());
-		monthReport.setMonth(month);
-		//如果订单签单时间是在201801-201811之间的不用重新计算,并且是历史数据
-		Integer history = monthReportMapper.getHistory(monthReport);
-		if(month > 201811 && history != 0){
-			//重新校对月统计
-			int c = monthReportMapper.updateByMonth(month);
-			LoggerUtils.debug(logger, "更新订单统计【%s】条。", c);
-		}
+		//重新校对月统计
+		int c = monthReportMapper.updateByMonth(month);
+		LoggerUtils.debug(logger, "更新订单统计【%s】条。", c);
 	}
 	}
 
 
 	@Override
 	@Override