Commit 71650f23 by jianshuqin

oms订单数据新增wms实际运费

parent 5ee91182
...@@ -1148,7 +1148,10 @@ public class OrderSyncJob extends PointJob { ...@@ -1148,7 +1148,10 @@ public class OrderSyncJob extends PointJob {
dcBaseOmsPickVariances.setGmtCreate(LocalDateTime.now()); dcBaseOmsPickVariances.setGmtCreate(LocalDateTime.now());
dcBaseOmsPickVariances.setGmtModified(LocalDateTime.now()); dcBaseOmsPickVariances.setGmtModified(LocalDateTime.now());
totalCostBill = totalCostBill.add(dcBaseOmsPickVariances.getBillCost()); totalCostBill = totalCostBill.add(dcBaseOmsPickVariances.getBillCost());
dcBaseOmsPickVariancesMapper.upsert(dcBaseOmsPickVariances); int i = dcBaseOmsPickVariancesMapper.updateByExampleSelective(dcBaseOmsPickVariances, DcBaseOmsPickVariancesExample.newAndCreateCriteria().andBailunOrderIdEqualTo(dcBaseOmsPickVariances.getBailunOrderId()).andPickOrderIdEqualTo(dcBaseOmsPickVariances.getPickOrderId()).example());
if (i == 0) {
dcBaseOmsPickVariancesMapper.insertSelective(dcBaseOmsPickVariances);
}
} }
} }
dcBaseOmsOrder.setCostBill(totalCostBill); dcBaseOmsOrder.setCostBill(totalCostBill);
......
package com.bailuntec.mapper; package com.bailuntec.mapper;
import com.bailuntec.domain.entity.DcBaseOmsPickVariances; import com.bailuntec.domain.entity.DcBaseOmsPickVariances;
import com.bailuntec.domain.example.DcBaseOmsPickVariancesExample;
import org.apache.ibatis.annotations.Param;
public interface DcBaseOmsPickVariancesMapper { public interface DcBaseOmsPickVariancesMapper {
/** /**
...@@ -8,6 +10,22 @@ public interface DcBaseOmsPickVariancesMapper { ...@@ -8,6 +10,22 @@ public interface DcBaseOmsPickVariancesMapper {
* This method corresponds to the database table dc_base_oms_pick_variances * This method corresponds to the database table dc_base_oms_pick_variances
* *
* @mbg.generated * @mbg.generated
*/
int insertSelective(DcBaseOmsPickVariances record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_oms_pick_variances
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DcBaseOmsPickVariances record, @Param("example") DcBaseOmsPickVariancesExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_oms_pick_variances
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
int upsert(DcBaseOmsPickVariances record); int upsert(DcBaseOmsPickVariances record);
......
...@@ -20,6 +20,173 @@ ...@@ -20,6 +20,173 @@
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" /> <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" /> <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
</resultMap> </resultMap>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dc_base_oms_pick_variances
<set>
<if test="record.bailunOrderId != null">
bailun_order_id = #{record.bailunOrderId,jdbcType=VARCHAR},
</if>
<if test="record.pickOrderId != null">
pick_order_id = #{record.pickOrderId,jdbcType=VARCHAR},
</if>
<if test="record.oldWeight != null">
old_weight = #{record.oldWeight,jdbcType=DECIMAL},
</if>
<if test="record.oldCost != null">
old_cost = #{record.oldCost,jdbcType=DECIMAL},
</if>
<if test="record.newWeight != null">
new_weight = #{record.newWeight,jdbcType=DECIMAL},
</if>
<if test="record.newCost != null">
new_cost = #{record.newCost,jdbcType=DECIMAL},
</if>
<if test="record.billWeight != null">
bill_weight = #{record.billWeight,jdbcType=DECIMAL},
</if>
<if test="record.billCost != null">
bill_cost = #{record.billCost,jdbcType=DECIMAL},
</if>
<if test="record.weightDifference != null">
weight_difference = #{record.weightDifference,jdbcType=DECIMAL},
</if>
<if test="record.costDifference != null">
cost_difference = #{record.costDifference,jdbcType=DECIMAL},
</if>
<if test="record.gmtModified != null">
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsPickVariances">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dc_base_oms_pick_variances
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="bailunOrderId != null">
bailun_order_id,
</if>
<if test="pickOrderId != null">
pick_order_id,
</if>
<if test="oldWeight != null">
old_weight,
</if>
<if test="oldCost != null">
old_cost,
</if>
<if test="newWeight != null">
new_weight,
</if>
<if test="newCost != null">
new_cost,
</if>
<if test="billWeight != null">
bill_weight,
</if>
<if test="billCost != null">
bill_cost,
</if>
<if test="weightDifference != null">
weight_difference,
</if>
<if test="costDifference != null">
cost_difference,
</if>
<if test="gmtCreate != null">
gmt_create,
</if>
<if test="gmtModified != null">
gmt_modified,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="bailunOrderId != null">
#{bailunOrderId,jdbcType=VARCHAR},
</if>
<if test="pickOrderId != null">
#{pickOrderId,jdbcType=VARCHAR},
</if>
<if test="oldWeight != null">
#{oldWeight,jdbcType=DECIMAL},
</if>
<if test="oldCost != null">
#{oldCost,jdbcType=DECIMAL},
</if>
<if test="newWeight != null">
#{newWeight,jdbcType=DECIMAL},
</if>
<if test="newCost != null">
#{newCost,jdbcType=DECIMAL},
</if>
<if test="billWeight != null">
#{billWeight,jdbcType=DECIMAL},
</if>
<if test="billCost != null">
#{billCost,jdbcType=DECIMAL},
</if>
<if test="weightDifference != null">
#{weightDifference,jdbcType=DECIMAL},
</if>
<if test="costDifference != null">
#{costDifference,jdbcType=DECIMAL},
</if>
<if test="gmtCreate != null">
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="gmtModified != null">
#{gmtModified,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseOmsPickVariances"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseOmsPickVariances">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
......
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