Commit 6bbbd307 by yinyong

周转--新增亚马逊7、14、30天日均

parent b369fdfd
...@@ -647,6 +647,33 @@ public class DcAutoTurnover { ...@@ -647,6 +647,33 @@ public class DcAutoTurnover {
private String hqType; private String hqType;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_turnover.history_sevenday_sales_amazon
*
* @mbg.generated
*/
private BigDecimal historySevendaySalesAmazon;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_turnover.history_fourteenday_sales_amazon
*
* @mbg.generated
*/
private BigDecimal historyFourteendaySalesAmazon;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_turnover.history_thirtyday_sales_amazon
*
* @mbg.generated
*/
private BigDecimal historyThirtydaySalesAmazon;
/**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_auto_turnover * This method corresponds to the database table dc_auto_turnover
* *
...@@ -729,6 +756,9 @@ public class DcAutoTurnover { ...@@ -729,6 +756,9 @@ public class DcAutoTurnover {
sb.append(", isModifyQuantityInitAdvise=").append(isModifyQuantityInitAdvise); sb.append(", isModifyQuantityInitAdvise=").append(isModifyQuantityInitAdvise);
sb.append(", tagId=").append(tagId); sb.append(", tagId=").append(tagId);
sb.append(", hqType=").append(hqType); sb.append(", hqType=").append(hqType);
sb.append(", historySevendaySalesAmazon=").append(historySevendaySalesAmazon);
sb.append(", historyFourteendaySalesAmazon=").append(historyFourteendaySalesAmazon);
sb.append(", historyThirtydaySalesAmazon=").append(historyThirtydaySalesAmazon);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -821,7 +851,10 @@ public class DcAutoTurnover { ...@@ -821,7 +851,10 @@ public class DcAutoTurnover {
&& (this.getOriginalQuantityInitAdvise() == null ? other.getOriginalQuantityInitAdvise() == null : this.getOriginalQuantityInitAdvise().equals(other.getOriginalQuantityInitAdvise())) && (this.getOriginalQuantityInitAdvise() == null ? other.getOriginalQuantityInitAdvise() == null : this.getOriginalQuantityInitAdvise().equals(other.getOriginalQuantityInitAdvise()))
&& (this.getIsModifyQuantityInitAdvise() == null ? other.getIsModifyQuantityInitAdvise() == null : this.getIsModifyQuantityInitAdvise().equals(other.getIsModifyQuantityInitAdvise())) && (this.getIsModifyQuantityInitAdvise() == null ? other.getIsModifyQuantityInitAdvise() == null : this.getIsModifyQuantityInitAdvise().equals(other.getIsModifyQuantityInitAdvise()))
&& (this.getTagId() == null ? other.getTagId() == null : this.getTagId().equals(other.getTagId())) && (this.getTagId() == null ? other.getTagId() == null : this.getTagId().equals(other.getTagId()))
&& (this.getHqType() == null ? other.getHqType() == null : this.getHqType().equals(other.getHqType())); && (this.getHqType() == null ? other.getHqType() == null : this.getHqType().equals(other.getHqType()))
&& (this.getHistorySevendaySalesAmazon() == null ? other.getHistorySevendaySalesAmazon() == null : this.getHistorySevendaySalesAmazon().equals(other.getHistorySevendaySalesAmazon()))
&& (this.getHistoryFourteendaySalesAmazon() == null ? other.getHistoryFourteendaySalesAmazon() == null : this.getHistoryFourteendaySalesAmazon().equals(other.getHistoryFourteendaySalesAmazon()))
&& (this.getHistoryThirtydaySalesAmazon() == null ? other.getHistoryThirtydaySalesAmazon() == null : this.getHistoryThirtydaySalesAmazon().equals(other.getHistoryThirtydaySalesAmazon()));
} }
/** /**
...@@ -905,6 +938,9 @@ public class DcAutoTurnover { ...@@ -905,6 +938,9 @@ public class DcAutoTurnover {
result = prime * result + ((getIsModifyQuantityInitAdvise() == null) ? 0 : getIsModifyQuantityInitAdvise().hashCode()); result = prime * result + ((getIsModifyQuantityInitAdvise() == null) ? 0 : getIsModifyQuantityInitAdvise().hashCode());
result = prime * result + ((getTagId() == null) ? 0 : getTagId().hashCode()); result = prime * result + ((getTagId() == null) ? 0 : getTagId().hashCode());
result = prime * result + ((getHqType() == null) ? 0 : getHqType().hashCode()); result = prime * result + ((getHqType() == null) ? 0 : getHqType().hashCode());
result = prime * result + ((getHistorySevendaySalesAmazon() == null) ? 0 : getHistorySevendaySalesAmazon().hashCode());
result = prime * result + ((getHistoryFourteendaySalesAmazon() == null) ? 0 : getHistoryFourteendaySalesAmazon().hashCode());
result = prime * result + ((getHistoryThirtydaySalesAmazon() == null) ? 0 : getHistoryThirtydaySalesAmazon().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
...@@ -4810,6 +4810,186 @@ public class DcAutoTurnoverExample { ...@@ -4810,6 +4810,186 @@ public class DcAutoTurnoverExample {
addCriterion("hq_type not between", value1, value2, "hqType"); addCriterion("hq_type not between", value1, value2, "hqType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHistorySevendaySalesAmazonIsNull() {
addCriterion("history_sevenday_sales_amazon is null");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonIsNotNull() {
addCriterion("history_sevenday_sales_amazon is not null");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonEqualTo(BigDecimal value) {
addCriterion("history_sevenday_sales_amazon =", value, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonNotEqualTo(BigDecimal value) {
addCriterion("history_sevenday_sales_amazon <>", value, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonGreaterThan(BigDecimal value) {
addCriterion("history_sevenday_sales_amazon >", value, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("history_sevenday_sales_amazon >=", value, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonLessThan(BigDecimal value) {
addCriterion("history_sevenday_sales_amazon <", value, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonLessThanOrEqualTo(BigDecimal value) {
addCriterion("history_sevenday_sales_amazon <=", value, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonIn(List<BigDecimal> values) {
addCriterion("history_sevenday_sales_amazon in", values, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonNotIn(List<BigDecimal> values) {
addCriterion("history_sevenday_sales_amazon not in", values, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("history_sevenday_sales_amazon between", value1, value2, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistorySevendaySalesAmazonNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("history_sevenday_sales_amazon not between", value1, value2, "historySevendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonIsNull() {
addCriterion("history_fourteenday_sales_amazon is null");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonIsNotNull() {
addCriterion("history_fourteenday_sales_amazon is not null");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonEqualTo(BigDecimal value) {
addCriterion("history_fourteenday_sales_amazon =", value, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonNotEqualTo(BigDecimal value) {
addCriterion("history_fourteenday_sales_amazon <>", value, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonGreaterThan(BigDecimal value) {
addCriterion("history_fourteenday_sales_amazon >", value, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("history_fourteenday_sales_amazon >=", value, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonLessThan(BigDecimal value) {
addCriterion("history_fourteenday_sales_amazon <", value, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonLessThanOrEqualTo(BigDecimal value) {
addCriterion("history_fourteenday_sales_amazon <=", value, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonIn(List<BigDecimal> values) {
addCriterion("history_fourteenday_sales_amazon in", values, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonNotIn(List<BigDecimal> values) {
addCriterion("history_fourteenday_sales_amazon not in", values, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("history_fourteenday_sales_amazon between", value1, value2, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryFourteendaySalesAmazonNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("history_fourteenday_sales_amazon not between", value1, value2, "historyFourteendaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonIsNull() {
addCriterion("history_thirtyday_sales_amazon is null");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonIsNotNull() {
addCriterion("history_thirtyday_sales_amazon is not null");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonEqualTo(BigDecimal value) {
addCriterion("history_thirtyday_sales_amazon =", value, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonNotEqualTo(BigDecimal value) {
addCriterion("history_thirtyday_sales_amazon <>", value, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonGreaterThan(BigDecimal value) {
addCriterion("history_thirtyday_sales_amazon >", value, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("history_thirtyday_sales_amazon >=", value, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonLessThan(BigDecimal value) {
addCriterion("history_thirtyday_sales_amazon <", value, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonLessThanOrEqualTo(BigDecimal value) {
addCriterion("history_thirtyday_sales_amazon <=", value, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonIn(List<BigDecimal> values) {
addCriterion("history_thirtyday_sales_amazon in", values, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonNotIn(List<BigDecimal> values) {
addCriterion("history_thirtyday_sales_amazon not in", values, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("history_thirtyday_sales_amazon between", value1, value2, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
public Criteria andHistoryThirtydaySalesAmazonNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("history_thirtyday_sales_amazon not between", value1, value2, "historyThirtydaySalesAmazon");
return (Criteria) this;
}
} }
/** /**
......
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
<result column="is_modify_quantity_init_advise" jdbcType="INTEGER" property="isModifyQuantityInitAdvise" /> <result column="is_modify_quantity_init_advise" jdbcType="INTEGER" property="isModifyQuantityInitAdvise" />
<result column="tag_id" jdbcType="INTEGER" property="tagId" /> <result column="tag_id" jdbcType="INTEGER" property="tagId" />
<result column="hq_type" jdbcType="VARCHAR" property="hqType" /> <result column="hq_type" jdbcType="VARCHAR" property="hqType" />
<result column="history_sevenday_sales_amazon" jdbcType="DECIMAL" property="historySevendaySalesAmazon" />
<result column="history_fourteenday_sales_amazon" jdbcType="DECIMAL" property="historyFourteendaySalesAmazon" />
<result column="history_thirtyday_sales_amazon" jdbcType="DECIMAL" property="historyThirtydaySalesAmazon" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -164,7 +167,8 @@ ...@@ -164,7 +167,8 @@
bailun_category_id, buyer_name, suppliers_name, history_sevenday_sales_ebay, history_fourteenday_sales_ebay, bailun_category_id, buyer_name, suppliers_name, history_sevenday_sales_ebay, history_fourteenday_sales_ebay,
history_thirtyday_sales_ebay, history_sevenday_sales_aliexpress, history_fourteenday_sales_aliexpress, history_thirtyday_sales_ebay, history_sevenday_sales_aliexpress, history_fourteenday_sales_aliexpress,
history_thirtyday_sales_aliexpress, daily_weighted_sales, original_quantity_init_advise, history_thirtyday_sales_aliexpress, daily_weighted_sales, original_quantity_init_advise,
is_modify_quantity_init_advise, tag_id, hq_type is_modify_quantity_init_advise, tag_id, hq_type, history_sevenday_sales_amazon, history_fourteenday_sales_amazon,
history_thirtyday_sales_amazon
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -252,8 +256,9 @@ ...@@ -252,8 +256,9 @@
history_thirtyday_sales_ebay, history_sevenday_sales_aliexpress, history_thirtyday_sales_ebay, history_sevenday_sales_aliexpress,
history_fourteenday_sales_aliexpress, history_thirtyday_sales_aliexpress, history_fourteenday_sales_aliexpress, history_thirtyday_sales_aliexpress,
daily_weighted_sales, original_quantity_init_advise, daily_weighted_sales, original_quantity_init_advise,
is_modify_quantity_init_advise, tag_id, hq_type is_modify_quantity_init_advise, tag_id, hq_type,
) history_sevenday_sales_amazon, history_fourteenday_sales_amazon,
history_thirtyday_sales_amazon)
values (#{id,jdbcType=INTEGER}, #{purchaseAdviceId,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{purchaseAdviceId,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR}, #{quantityInitAdvise,jdbcType=DECIMAL}, #{quantityMinimumOrder,jdbcType=INTEGER}, #{warehouseCode,jdbcType=VARCHAR}, #{quantityInitAdvise,jdbcType=DECIMAL}, #{quantityMinimumOrder,jdbcType=INTEGER},
#{quantityFinalAdvise,jdbcType=DECIMAL}, #{warehouseName,jdbcType=VARCHAR}, #{quantityPromotion,jdbcType=INTEGER}, #{quantityFinalAdvise,jdbcType=DECIMAL}, #{warehouseName,jdbcType=VARCHAR}, #{quantityPromotion,jdbcType=INTEGER},
...@@ -281,8 +286,9 @@ ...@@ -281,8 +286,9 @@
#{historyThirtydaySalesEbay,jdbcType=DECIMAL}, #{historySevendaySalesAliexpress,jdbcType=DECIMAL}, #{historyThirtydaySalesEbay,jdbcType=DECIMAL}, #{historySevendaySalesAliexpress,jdbcType=DECIMAL},
#{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL}, #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
#{dailyWeightedSales,jdbcType=DECIMAL}, #{originalQuantityInitAdvise,jdbcType=INTEGER}, #{dailyWeightedSales,jdbcType=DECIMAL}, #{originalQuantityInitAdvise,jdbcType=INTEGER},
#{isModifyQuantityInitAdvise,jdbcType=INTEGER}, #{tagId,jdbcType=INTEGER}, #{hqType,jdbcType=VARCHAR} #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, #{tagId,jdbcType=INTEGER}, #{hqType,jdbcType=VARCHAR},
) #{historySevendaySalesAmazon,jdbcType=DECIMAL}, #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
#{historyThirtydaySalesAmazon,jdbcType=DECIMAL})
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoTurnover"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcAutoTurnover">
<!-- <!--
...@@ -504,6 +510,15 @@ ...@@ -504,6 +510,15 @@
<if test="hqType != null"> <if test="hqType != null">
hq_type, hq_type,
</if> </if>
<if test="historySevendaySalesAmazon != null">
history_sevenday_sales_amazon,
</if>
<if test="historyFourteendaySalesAmazon != null">
history_fourteenday_sales_amazon,
</if>
<if test="historyThirtydaySalesAmazon != null">
history_thirtyday_sales_amazon,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -719,6 +734,15 @@ ...@@ -719,6 +734,15 @@
<if test="hqType != null"> <if test="hqType != null">
#{hqType,jdbcType=VARCHAR}, #{hqType,jdbcType=VARCHAR},
</if> </if>
<if test="historySevendaySalesAmazon != null">
#{historySevendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="historyFourteendaySalesAmazon != null">
#{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="historyThirtydaySalesAmazon != null">
#{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultType="java.lang.Long">
...@@ -951,6 +975,15 @@ ...@@ -951,6 +975,15 @@
<if test="record.hqType != null"> <if test="record.hqType != null">
hq_type = #{record.hqType,jdbcType=VARCHAR}, hq_type = #{record.hqType,jdbcType=VARCHAR},
</if> </if>
<if test="record.historySevendaySalesAmazon != null">
history_sevenday_sales_amazon = #{record.historySevendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="record.historyFourteendaySalesAmazon != null">
history_fourteenday_sales_amazon = #{record.historyFourteendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="record.historyThirtydaySalesAmazon != null">
history_thirtyday_sales_amazon = #{record.historyThirtydaySalesAmazon,jdbcType=DECIMAL},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -1032,7 +1065,10 @@ ...@@ -1032,7 +1065,10 @@
original_quantity_init_advise = #{record.originalQuantityInitAdvise,jdbcType=INTEGER}, original_quantity_init_advise = #{record.originalQuantityInitAdvise,jdbcType=INTEGER},
is_modify_quantity_init_advise = #{record.isModifyQuantityInitAdvise,jdbcType=INTEGER}, is_modify_quantity_init_advise = #{record.isModifyQuantityInitAdvise,jdbcType=INTEGER},
tag_id = #{record.tagId,jdbcType=INTEGER}, tag_id = #{record.tagId,jdbcType=INTEGER},
hq_type = #{record.hqType,jdbcType=VARCHAR} hq_type = #{record.hqType,jdbcType=VARCHAR},
history_sevenday_sales_amazon = #{record.historySevendaySalesAmazon,jdbcType=DECIMAL},
history_fourteenday_sales_amazon = #{record.historyFourteendaySalesAmazon,jdbcType=DECIMAL},
history_thirtyday_sales_amazon = #{record.historyThirtydaySalesAmazon,jdbcType=DECIMAL}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -1254,6 +1290,15 @@ ...@@ -1254,6 +1290,15 @@
<if test="hqType != null"> <if test="hqType != null">
hq_type = #{hqType,jdbcType=VARCHAR}, hq_type = #{hqType,jdbcType=VARCHAR},
</if> </if>
<if test="historySevendaySalesAmazon != null">
history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="historyFourteendaySalesAmazon != null">
history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="historyThirtydaySalesAmazon != null">
history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -1332,7 +1377,10 @@ ...@@ -1332,7 +1377,10 @@
original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER}, original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER},
is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER},
tag_id = #{tagId,jdbcType=INTEGER}, tag_id = #{tagId,jdbcType=INTEGER},
hq_type = #{hqType,jdbcType=VARCHAR} hq_type = #{hqType,jdbcType=VARCHAR},
history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL},
history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcAutoTurnover"> <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcAutoTurnover">
...@@ -1556,6 +1604,15 @@ ...@@ -1556,6 +1604,15 @@
<if test="hqType != null"> <if test="hqType != null">
hq_type, hq_type,
</if> </if>
<if test="historySevendaySalesAmazon != null">
history_sevenday_sales_amazon,
</if>
<if test="historyFourteendaySalesAmazon != null">
history_fourteenday_sales_amazon,
</if>
<if test="historyThirtydaySalesAmazon != null">
history_thirtyday_sales_amazon,
</if>
</trim> </trim>
values values
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -1772,6 +1829,15 @@ ...@@ -1772,6 +1829,15 @@
<if test="hqType != null"> <if test="hqType != null">
#{hqType,jdbcType=VARCHAR}, #{hqType,jdbcType=VARCHAR},
</if> </if>
<if test="historySevendaySalesAmazon != null">
#{historySevendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="historyFourteendaySalesAmazon != null">
#{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="historyThirtydaySalesAmazon != null">
#{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<trim suffixOverrides=","> <trim suffixOverrides=",">
...@@ -1988,6 +2054,15 @@ ...@@ -1988,6 +2054,15 @@
<if test="hqType != null"> <if test="hqType != null">
hq_type = #{hqType,jdbcType=VARCHAR}, hq_type = #{hqType,jdbcType=VARCHAR},
</if> </if>
<if test="historySevendaySalesAmazon != null">
history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="historyFourteendaySalesAmazon != null">
history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
</if>
<if test="historyThirtydaySalesAmazon != null">
history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL},
</if>
</trim> </trim>
</insert> </insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoTurnover"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcAutoTurnover">
...@@ -2013,7 +2088,8 @@ ...@@ -2013,7 +2088,8 @@
buyer_name, suppliers_name, history_sevenday_sales_ebay, history_fourteenday_sales_ebay, buyer_name, suppliers_name, history_sevenday_sales_ebay, history_fourteenday_sales_ebay,
history_thirtyday_sales_ebay, history_sevenday_sales_aliexpress, history_fourteenday_sales_aliexpress, history_thirtyday_sales_ebay, history_sevenday_sales_aliexpress, history_fourteenday_sales_aliexpress,
history_thirtyday_sales_aliexpress, daily_weighted_sales, original_quantity_init_advise, history_thirtyday_sales_aliexpress, daily_weighted_sales, original_quantity_init_advise,
is_modify_quantity_init_advise, tag_id, hq_type) is_modify_quantity_init_advise, tag_id, hq_type, history_sevenday_sales_amazon,
history_fourteenday_sales_amazon, history_thirtyday_sales_amazon)
values values
(#{id,jdbcType=INTEGER}, #{purchaseAdviceId,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR}, (#{id,jdbcType=INTEGER}, #{purchaseAdviceId,jdbcType=VARCHAR}, #{bailunSku,jdbcType=VARCHAR},
#{warehouseCode,jdbcType=VARCHAR}, #{quantityInitAdvise,jdbcType=DECIMAL}, #{quantityMinimumOrder,jdbcType=INTEGER}, #{warehouseCode,jdbcType=VARCHAR}, #{quantityInitAdvise,jdbcType=DECIMAL}, #{quantityMinimumOrder,jdbcType=INTEGER},
...@@ -2042,8 +2118,9 @@ ...@@ -2042,8 +2118,9 @@
#{historyThirtydaySalesEbay,jdbcType=DECIMAL}, #{historySevendaySalesAliexpress,jdbcType=DECIMAL}, #{historyThirtydaySalesEbay,jdbcType=DECIMAL}, #{historySevendaySalesAliexpress,jdbcType=DECIMAL},
#{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL}, #{historyFourteendaySalesAliexpress,jdbcType=DECIMAL}, #{historyThirtydaySalesAliexpress,jdbcType=DECIMAL},
#{dailyWeightedSales,jdbcType=DECIMAL}, #{originalQuantityInitAdvise,jdbcType=INTEGER}, #{dailyWeightedSales,jdbcType=DECIMAL}, #{originalQuantityInitAdvise,jdbcType=INTEGER},
#{isModifyQuantityInitAdvise,jdbcType=INTEGER}, #{tagId,jdbcType=INTEGER}, #{hqType,jdbcType=VARCHAR} #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, #{tagId,jdbcType=INTEGER}, #{hqType,jdbcType=VARCHAR},
) #{historySevendaySalesAmazon,jdbcType=DECIMAL}, #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
#{historyThirtydaySalesAmazon,jdbcType=DECIMAL})
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
purchase_advice_id = #{purchaseAdviceId,jdbcType=VARCHAR}, purchase_advice_id = #{purchaseAdviceId,jdbcType=VARCHAR},
...@@ -2115,7 +2192,10 @@ ...@@ -2115,7 +2192,10 @@
original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER}, original_quantity_init_advise = #{originalQuantityInitAdvise,jdbcType=INTEGER},
is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER}, is_modify_quantity_init_advise = #{isModifyQuantityInitAdvise,jdbcType=INTEGER},
tag_id = #{tagId,jdbcType=INTEGER}, tag_id = #{tagId,jdbcType=INTEGER},
hq_type = #{hqType,jdbcType=VARCHAR} hq_type = #{hqType,jdbcType=VARCHAR},
history_sevenday_sales_amazon = #{historySevendaySalesAmazon,jdbcType=DECIMAL},
history_fourteenday_sales_amazon = #{historyFourteendaySalesAmazon,jdbcType=DECIMAL},
history_thirtyday_sales_amazon = #{historyThirtydaySalesAmazon,jdbcType=DECIMAL}
</insert> </insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcAutoTurnoverExample" resultMap="BaseResultMap">
<!-- <!--
......
...@@ -589,14 +589,8 @@ public class AutoTurnoverJob extends PointJob { ...@@ -589,14 +589,8 @@ public class AutoTurnoverJob extends PointJob {
dcAutoTurnover.setHistoryFourteendaySalesEbay(BigDecimal.valueOf(ebayAvgSales.getFourteendaySales()).divide(Constant.BIGDECIMAL_FOURTEEN, 3, RoundingMode.HALF_EVEN)); dcAutoTurnover.setHistoryFourteendaySalesEbay(BigDecimal.valueOf(ebayAvgSales.getFourteendaySales()).divide(Constant.BIGDECIMAL_FOURTEEN, 3, RoundingMode.HALF_EVEN));
dcAutoTurnover.setHistoryThirtydaySalesEbay(BigDecimal.valueOf(ebayAvgSales.getThirtydaySales()).divide(Constant.BIGDECIMAL_THIRTY, 3, RoundingMode.HALF_EVEN)); dcAutoTurnover.setHistoryThirtydaySalesEbay(BigDecimal.valueOf(ebayAvgSales.getThirtydaySales()).divide(Constant.BIGDECIMAL_THIRTY, 3, RoundingMode.HALF_EVEN));
} }
} catch (Exception e) {
throw new RuntimeException("计算平台的平均销量失败", e);
} finally {
SessionUtil.closeSession();
}
try { mapper = SessionUtil.getSession().getMapper(DcAutoSalesMapper.class);
DcAutoSalesMapper mapper = SessionUtil.getSession().getMapper(DcAutoSalesMapper.class);
SalesVolumeAvgDTO aliexpressAvgSales = mapper.getPlatformHistorySales(dcAutoTurnover.getBailunSku(), dcAutoTurnover.getWarehouseCode(), PlatformType.Aliexpress.value()); SalesVolumeAvgDTO aliexpressAvgSales = mapper.getPlatformHistorySales(dcAutoTurnover.getBailunSku(), dcAutoTurnover.getWarehouseCode(), PlatformType.Aliexpress.value());
dcAutoTurnover.setHistorySevendaySalesAliexpress(BigDecimal.ZERO); dcAutoTurnover.setHistorySevendaySalesAliexpress(BigDecimal.ZERO);
dcAutoTurnover.setHistoryFourteendaySalesAliexpress(BigDecimal.ZERO); dcAutoTurnover.setHistoryFourteendaySalesAliexpress(BigDecimal.ZERO);
...@@ -606,6 +600,17 @@ public class AutoTurnoverJob extends PointJob { ...@@ -606,6 +600,17 @@ public class AutoTurnoverJob extends PointJob {
dcAutoTurnover.setHistoryFourteendaySalesAliexpress(BigDecimal.valueOf(aliexpressAvgSales.getFourteendaySales()).divide(Constant.BIGDECIMAL_FOURTEEN, 3, RoundingMode.HALF_EVEN)); dcAutoTurnover.setHistoryFourteendaySalesAliexpress(BigDecimal.valueOf(aliexpressAvgSales.getFourteendaySales()).divide(Constant.BIGDECIMAL_FOURTEEN, 3, RoundingMode.HALF_EVEN));
dcAutoTurnover.setHistoryThirtydaySalesAliexpress(BigDecimal.valueOf(aliexpressAvgSales.getThirtydaySales()).divide(Constant.BIGDECIMAL_THIRTY, 3, RoundingMode.HALF_EVEN)); dcAutoTurnover.setHistoryThirtydaySalesAliexpress(BigDecimal.valueOf(aliexpressAvgSales.getThirtydaySales()).divide(Constant.BIGDECIMAL_THIRTY, 3, RoundingMode.HALF_EVEN));
} }
mapper = SessionUtil.getSession().getMapper(DcAutoSalesMapper.class);
SalesVolumeAvgDTO amazonAvgSales = mapper.getPlatformHistorySales(dcAutoTurnover.getBailunSku(), dcAutoTurnover.getWarehouseCode(), PlatformType.Amazon.value());
dcAutoTurnover.setHistorySevendaySalesAmazon(BigDecimal.ZERO);
dcAutoTurnover.setHistoryFourteendaySalesAmazon(BigDecimal.ZERO);
dcAutoTurnover.setHistoryThirtydaySalesAmazon(BigDecimal.ZERO);
if (amazonAvgSales != null) {
dcAutoTurnover.setHistorySevendaySalesAmazon(BigDecimal.valueOf(amazonAvgSales.getSevendaySales()).divide(Constant.BIGDECIMAL_SEVEN, 3, RoundingMode.HALF_EVEN));
dcAutoTurnover.setHistoryFourteendaySalesAmazon(BigDecimal.valueOf(amazonAvgSales.getFourteendaySales()).divide(Constant.BIGDECIMAL_FOURTEEN, 3, RoundingMode.HALF_EVEN));
dcAutoTurnover.setHistoryThirtydaySalesAmazon(BigDecimal.valueOf(amazonAvgSales.getThirtydaySales()).divide(Constant.BIGDECIMAL_THIRTY, 3, RoundingMode.HALF_EVEN));
}
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException("计算平台的平均销量失败", e); throw new RuntimeException("计算平台的平均销量失败", e);
} finally { } finally {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment