Commit 683ca775 by wutong

订单处理时区分内购订单, 内购订单不计算销量和缺货

parent 17420283
...@@ -39,7 +39,6 @@ public class OrderSyncJob extends PointJob { ...@@ -39,7 +39,6 @@ public class OrderSyncJob extends PointJob {
public void executeJob(ShardingContext shardingContext, JobPointLog jobPointLog) { public void executeJob(ShardingContext shardingContext, JobPointLog jobPointLog) {
LinkedHashMap<String, String> map = new LinkedHashMap<>(4); LinkedHashMap<String, String> map = new LinkedHashMap<>(4);
//临时处理速卖通数据 //临时处理速卖通数据
// map.put("Type", "3");
map.put("pageCount", jobPointLog.getPageSize().toString()); map.put("pageCount", jobPointLog.getPageSize().toString());
//时间回退一点, 避免服务器时间不一致而漏单 //时间回退一点, 避免服务器时间不一致而漏单
map.put("BailunLastUpdateTimeFrom", DateTimeFormatter.ofPattern(CommonConstant.TIME_FORMAT).format(jobPointLog.getStartTime().minusMinutes(3))); map.put("BailunLastUpdateTimeFrom", DateTimeFormatter.ofPattern(CommonConstant.TIME_FORMAT).format(jobPointLog.getStartTime().minusMinutes(3)));
...@@ -109,6 +108,8 @@ public class OrderSyncJob extends PointJob { ...@@ -109,6 +108,8 @@ public class OrderSyncJob extends PointJob {
DcBaseOmsOrder dcBaseOmsOrder = new DcBaseOmsOrder(); DcBaseOmsOrder dcBaseOmsOrder = new DcBaseOmsOrder();
assignmentOrderInfo(omsResult, dcBaseOmsOrder); assignmentOrderInfo(omsResult, dcBaseOmsOrder);
deleteSku(dcBaseOmsOrder);//因为OMS可能改订单, 部分SKU有可能会被删除, 所以先删除, 再插入, 并且更新退款为未予订单关联 deleteSku(dcBaseOmsOrder);//因为OMS可能改订单, 部分SKU有可能会被删除, 所以先删除, 再插入, 并且更新退款为未予订单关联
//判断是否内购订单
hasInnerSale(omsResult, dcBaseOmsOrder);
//判断是否刷单订单 //判断是否刷单订单
listOrderExceptions(omsResult, dcBaseOmsOrder); listOrderExceptions(omsResult, dcBaseOmsOrder);
//获取汇率 //获取汇率
...@@ -361,6 +362,7 @@ public class OrderSyncJob extends PointJob { ...@@ -361,6 +362,7 @@ public class OrderSyncJob extends PointJob {
totalProfit = totalProfit.add(skuShippedProfit); totalProfit = totalProfit.add(skuShippedProfit);
//SKU只放单个利润 //SKU只放单个利润
dcBaseOmsSku.setProfitTotal(unitSkuProfit); dcBaseOmsSku.setProfitTotal(unitSkuProfit);
dcBaseOmsSku.setHasInnersale(dcBaseOmsOrder.getHasInnersale());
if (skuAmountSalesRMB.compareTo(BigDecimal.ZERO) == 0) { if (skuAmountSalesRMB.compareTo(BigDecimal.ZERO) == 0) {
dcBaseOmsSku.setProfitRate(BigDecimal.ZERO); dcBaseOmsSku.setProfitRate(BigDecimal.ZERO);
} else { } else {
...@@ -441,6 +443,14 @@ public class OrderSyncJob extends PointJob { ...@@ -441,6 +443,14 @@ public class OrderSyncJob extends PointJob {
} }
} }
private void hasInnerSale(OmsResult omsResult, DcBaseOmsOrder dcBaseOmsOrder) {
String substring = omsResult.getOriginOrderId().substring(0, 6);
dcBaseOmsOrder.setHasInnersale(false);
if (substring.toLowerCase().equals("neigou")) {
dcBaseOmsOrder.setHasInnersale(true);
}
}
private LocalDateTime timeZoneChange(String site, LocalDateTime localDateTime) { private LocalDateTime timeZoneChange(String site, LocalDateTime localDateTime) {
LocalDateTime timeZoneChangeTime = null; LocalDateTime timeZoneChangeTime = null;
if (localDateTime != null) { if (localDateTime != null) {
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
<result column="bailun_picking_status" jdbcType="VARCHAR" property="bailunPickingStatus" /> <result column="bailun_picking_status" jdbcType="VARCHAR" property="bailunPickingStatus" />
<result column="bailun_require_logistics" jdbcType="VARCHAR" property="bailunRequireLogistics" /> <result column="bailun_require_logistics" jdbcType="VARCHAR" property="bailunRequireLogistics" />
<result column="has_scalp" jdbcType="BIT" property="hasScalp" /> <result column="has_scalp" jdbcType="BIT" property="hasScalp" />
<result column="has_innersale" jdbcType="BIT" property="hasInnersale" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -182,7 +183,7 @@ ...@@ -182,7 +183,7 @@
buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create, buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create,
gmt_modified, quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name, gmt_modified, quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name,
logistics_method_code, logistics_method_name, bailun_picking_status, bailun_require_logistics, logistics_method_code, logistics_method_name, bailun_picking_status, bailun_require_logistics,
has_scalp has_scalp, has_innersale
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -275,7 +276,7 @@ ...@@ -275,7 +276,7 @@
logistics_warehouse_code, logistics_warehouse_name, logistics_warehouse_code, logistics_warehouse_name,
logistics_method_code, logistics_method_name, logistics_method_code, logistics_method_name,
bailun_picking_status, bailun_require_logistics, bailun_picking_status, bailun_require_logistics,
has_scalp) has_scalp, has_innersale)
values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR},
#{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR}, #{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR},
...@@ -308,7 +309,7 @@ ...@@ -308,7 +309,7 @@
#{logisticsWarehouseCode,jdbcType=VARCHAR}, #{logisticsWarehouseName,jdbcType=VARCHAR}, #{logisticsWarehouseCode,jdbcType=VARCHAR}, #{logisticsWarehouseName,jdbcType=VARCHAR},
#{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR}, #{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR},
#{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}, #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR},
#{hasScalp,jdbcType=BIT}) #{hasScalp,jdbcType=BIT}, #{hasInnersale,jdbcType=BIT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
<!-- <!--
...@@ -578,6 +579,9 @@ ...@@ -578,6 +579,9 @@
<if test="hasScalp != null"> <if test="hasScalp != null">
has_scalp, has_scalp,
</if> </if>
<if test="hasInnersale != null">
has_innersale,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -841,6 +845,9 @@ ...@@ -841,6 +845,9 @@
<if test="hasScalp != null"> <if test="hasScalp != null">
#{hasScalp,jdbcType=BIT}, #{hasScalp,jdbcType=BIT},
</if> </if>
<if test="hasInnersale != null">
#{hasInnersale,jdbcType=BIT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultType="java.lang.Long">
...@@ -1121,6 +1128,9 @@ ...@@ -1121,6 +1128,9 @@
<if test="record.hasScalp != null"> <if test="record.hasScalp != null">
has_scalp = #{record.hasScalp,jdbcType=BIT}, has_scalp = #{record.hasScalp,jdbcType=BIT},
</if> </if>
<if test="record.hasInnersale != null">
has_innersale = #{record.hasInnersale,jdbcType=BIT},
</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" />
...@@ -1218,7 +1228,8 @@ ...@@ -1218,7 +1228,8 @@
logistics_method_name = #{record.logisticsMethodName,jdbcType=VARCHAR}, logistics_method_name = #{record.logisticsMethodName,jdbcType=VARCHAR},
bailun_picking_status = #{record.bailunPickingStatus,jdbcType=VARCHAR}, bailun_picking_status = #{record.bailunPickingStatus,jdbcType=VARCHAR},
bailun_require_logistics = #{record.bailunRequireLogistics,jdbcType=VARCHAR}, bailun_require_logistics = #{record.bailunRequireLogistics,jdbcType=VARCHAR},
has_scalp = #{record.hasScalp,jdbcType=BIT} has_scalp = #{record.hasScalp,jdbcType=BIT},
has_innersale = #{record.hasInnersale,jdbcType=BIT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -1488,6 +1499,9 @@ ...@@ -1488,6 +1499,9 @@
<if test="hasScalp != null"> <if test="hasScalp != null">
has_scalp = #{hasScalp,jdbcType=BIT}, has_scalp = #{hasScalp,jdbcType=BIT},
</if> </if>
<if test="hasInnersale != null">
has_innersale = #{hasInnersale,jdbcType=BIT},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -1582,7 +1596,8 @@ ...@@ -1582,7 +1596,8 @@
logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR}, logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
bailun_picking_status = #{bailunPickingStatus,jdbcType=VARCHAR}, bailun_picking_status = #{bailunPickingStatus,jdbcType=VARCHAR},
bailun_require_logistics = #{bailunRequireLogistics,jdbcType=VARCHAR}, bailun_require_logistics = #{bailunRequireLogistics,jdbcType=VARCHAR},
has_scalp = #{hasScalp,jdbcType=BIT} has_scalp = #{hasScalp,jdbcType=BIT},
has_innersale = #{hasInnersale,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder"> <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
...@@ -1854,6 +1869,9 @@ ...@@ -1854,6 +1869,9 @@
<if test="hasScalp != null"> <if test="hasScalp != null">
has_scalp, has_scalp,
</if> </if>
<if test="hasInnersale != null">
has_innersale,
</if>
</trim> </trim>
values values
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -2118,6 +2136,9 @@ ...@@ -2118,6 +2136,9 @@
<if test="hasScalp != null"> <if test="hasScalp != null">
#{hasScalp,jdbcType=BIT}, #{hasScalp,jdbcType=BIT},
</if> </if>
<if test="hasInnersale != null">
#{hasInnersale,jdbcType=BIT},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<trim suffixOverrides=","> <trim suffixOverrides=",">
...@@ -2382,6 +2403,9 @@ ...@@ -2382,6 +2403,9 @@
<if test="hasScalp != null"> <if test="hasScalp != null">
has_scalp = #{hasScalp,jdbcType=BIT}, has_scalp = #{hasScalp,jdbcType=BIT},
</if> </if>
<if test="hasInnersale != null">
has_innersale = #{hasInnersale,jdbcType=BIT},
</if>
</trim> </trim>
</insert> </insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
...@@ -2408,7 +2432,7 @@ ...@@ -2408,7 +2432,7 @@
buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create, buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create,
gmt_modified, quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name, gmt_modified, quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name,
logistics_method_code, logistics_method_name, bailun_picking_status, bailun_require_logistics, logistics_method_code, logistics_method_name, bailun_picking_status, bailun_require_logistics,
has_scalp) has_scalp, has_innersale)
values values
(#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR},
...@@ -2442,7 +2466,7 @@ ...@@ -2442,7 +2466,7 @@
#{logisticsWarehouseCode,jdbcType=VARCHAR}, #{logisticsWarehouseName,jdbcType=VARCHAR}, #{logisticsWarehouseCode,jdbcType=VARCHAR}, #{logisticsWarehouseName,jdbcType=VARCHAR},
#{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR}, #{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR},
#{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}, #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR},
#{hasScalp,jdbcType=BIT}) #{hasScalp,jdbcType=BIT}, #{hasInnersale,jdbcType=BIT})
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
origin_order_id = #{originOrderId,jdbcType=VARCHAR}, origin_order_id = #{originOrderId,jdbcType=VARCHAR},
...@@ -2530,7 +2554,8 @@ ...@@ -2530,7 +2554,8 @@
logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR}, logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
bailun_picking_status = #{bailunPickingStatus,jdbcType=VARCHAR}, bailun_picking_status = #{bailunPickingStatus,jdbcType=VARCHAR},
bailun_require_logistics = #{bailunRequireLogistics,jdbcType=VARCHAR}, bailun_require_logistics = #{bailunRequireLogistics,jdbcType=VARCHAR},
has_scalp = #{hasScalp,jdbcType=BIT} has_scalp = #{hasScalp,jdbcType=BIT},
has_innersale = #{hasInnersale,jdbcType=BIT}
</insert> </insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -2550,7 +2575,6 @@ ...@@ -2550,7 +2575,6 @@
limit 1 limit 1
</select> </select>
<update id="logicDeleteOmsSku"> <update id="logicDeleteOmsSku">
update dc_base_oms_sku set has_delete=1 where origin_order_id=#{originOrderId,jdbcType=VARCHAR} and bailun_account_id = #{bailunAccountId,jdbcType=INTEGER} update dc_base_oms_sku set has_delete=1 where origin_order_id=#{originOrderId,jdbcType=VARCHAR} and bailun_account_id = #{bailunAccountId,jdbcType=INTEGER}
</update> </update>
......
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
<result column="has_scalp" jdbcType="BIT" property="hasScalp" /> <result column="has_scalp" jdbcType="BIT" property="hasScalp" />
<result column="logistics_method_code" jdbcType="VARCHAR" property="logisticsMethodCode" /> <result column="logistics_method_code" jdbcType="VARCHAR" property="logisticsMethodCode" />
<result column="logistics_method_name" jdbcType="VARCHAR" property="logisticsMethodName" /> <result column="logistics_method_name" jdbcType="VARCHAR" property="logisticsMethodName" />
<result column="has_innersale" jdbcType="BIT" property="hasInnersale" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -199,7 +200,7 @@ ...@@ -199,7 +200,7 @@
receiver, receiver_phone, buyer_id, buyer_name, buyer_email, has_fba_exception, has_platform_exception, receiver, receiver_phone, buyer_id, buyer_name, buyer_email, has_fba_exception, has_platform_exception,
has_cancle, area_id, bailun_category_id, bailun_category_name, gmt_create, gmt_modified, has_cancle, area_id, bailun_category_id, bailun_category_name, gmt_create, gmt_modified,
ratio_weight, ratio_price, bailun_picking_status, bailun_require_logistics, has_delete, ratio_weight, ratio_price, bailun_picking_status, bailun_require_logistics, has_delete,
has_scalp, logistics_method_code, logistics_method_name has_scalp, logistics_method_code, logistics_method_name, has_innersale
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsSkuExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsSkuExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -297,7 +298,7 @@ ...@@ -297,7 +298,7 @@
gmt_modified, ratio_weight, ratio_price, gmt_modified, ratio_weight, ratio_price,
bailun_picking_status, bailun_require_logistics, bailun_picking_status, bailun_require_logistics,
has_delete, has_scalp, logistics_method_code, has_delete, has_scalp, logistics_method_code,
logistics_method_name) logistics_method_name, has_innersale)
values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR},
#{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR}, #{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR},
...@@ -335,7 +336,7 @@ ...@@ -335,7 +336,7 @@
#{gmtModified,jdbcType=TIMESTAMP}, #{ratioWeight,jdbcType=DECIMAL}, #{ratioPrice,jdbcType=DECIMAL}, #{gmtModified,jdbcType=TIMESTAMP}, #{ratioWeight,jdbcType=DECIMAL}, #{ratioPrice,jdbcType=DECIMAL},
#{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}, #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR},
#{hasDelete,jdbcType=BIT}, #{hasScalp,jdbcType=BIT}, #{logisticsMethodCode,jdbcType=VARCHAR}, #{hasDelete,jdbcType=BIT}, #{hasScalp,jdbcType=BIT}, #{logisticsMethodCode,jdbcType=VARCHAR},
#{logisticsMethodName,jdbcType=VARCHAR}) #{logisticsMethodName,jdbcType=VARCHAR}, #{hasInnersale,jdbcType=BIT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsSku"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsSku">
<!-- <!--
...@@ -650,6 +651,9 @@ ...@@ -650,6 +651,9 @@
<if test="logisticsMethodName != null"> <if test="logisticsMethodName != null">
logistics_method_name, logistics_method_name,
</if> </if>
<if test="hasInnersale != null">
has_innersale,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -958,6 +962,9 @@ ...@@ -958,6 +962,9 @@
<if test="logisticsMethodName != null"> <if test="logisticsMethodName != null">
#{logisticsMethodName,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR},
</if> </if>
<if test="hasInnersale != null">
#{hasInnersale,jdbcType=BIT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsSkuExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsSkuExample" resultType="java.lang.Long">
...@@ -1283,6 +1290,9 @@ ...@@ -1283,6 +1290,9 @@
<if test="record.logisticsMethodName != null"> <if test="record.logisticsMethodName != null">
logistics_method_name = #{record.logisticsMethodName,jdbcType=VARCHAR}, logistics_method_name = #{record.logisticsMethodName,jdbcType=VARCHAR},
</if> </if>
<if test="record.hasInnersale != null">
has_innersale = #{record.hasInnersale,jdbcType=BIT},
</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" />
...@@ -1395,7 +1405,8 @@ ...@@ -1395,7 +1405,8 @@
has_delete = #{record.hasDelete,jdbcType=BIT}, has_delete = #{record.hasDelete,jdbcType=BIT},
has_scalp = #{record.hasScalp,jdbcType=BIT}, has_scalp = #{record.hasScalp,jdbcType=BIT},
logistics_method_code = #{record.logisticsMethodCode,jdbcType=VARCHAR}, logistics_method_code = #{record.logisticsMethodCode,jdbcType=VARCHAR},
logistics_method_name = #{record.logisticsMethodName,jdbcType=VARCHAR} logistics_method_name = #{record.logisticsMethodName,jdbcType=VARCHAR},
has_innersale = #{record.hasInnersale,jdbcType=BIT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -1710,6 +1721,9 @@ ...@@ -1710,6 +1721,9 @@
<if test="logisticsMethodName != null"> <if test="logisticsMethodName != null">
logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR}, logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
</if> </if>
<if test="hasInnersale != null">
has_innersale = #{hasInnersale,jdbcType=BIT},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -1819,7 +1833,8 @@ ...@@ -1819,7 +1833,8 @@
has_delete = #{hasDelete,jdbcType=BIT}, has_delete = #{hasDelete,jdbcType=BIT},
has_scalp = #{hasScalp,jdbcType=BIT}, has_scalp = #{hasScalp,jdbcType=BIT},
logistics_method_code = #{logisticsMethodCode,jdbcType=VARCHAR}, logistics_method_code = #{logisticsMethodCode,jdbcType=VARCHAR},
logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR} logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
has_innersale = #{hasInnersale,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsSku"> <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsSku">
...@@ -2136,6 +2151,9 @@ ...@@ -2136,6 +2151,9 @@
<if test="logisticsMethodName != null"> <if test="logisticsMethodName != null">
logistics_method_name, logistics_method_name,
</if> </if>
<if test="hasInnersale != null">
has_innersale,
</if>
</trim> </trim>
values values
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -2445,6 +2463,9 @@ ...@@ -2445,6 +2463,9 @@
<if test="logisticsMethodName != null"> <if test="logisticsMethodName != null">
#{logisticsMethodName,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR},
</if> </if>
<if test="hasInnersale != null">
#{hasInnersale,jdbcType=BIT},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<trim suffixOverrides=","> <trim suffixOverrides=",">
...@@ -2754,6 +2775,9 @@ ...@@ -2754,6 +2775,9 @@
<if test="logisticsMethodName != null"> <if test="logisticsMethodName != null">
logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR}, logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
</if> </if>
<if test="hasInnersale != null">
has_innersale = #{hasInnersale,jdbcType=BIT},
</if>
</trim> </trim>
</insert> </insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseOmsSku"> <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseOmsSku">
...@@ -2782,8 +2806,8 @@ ...@@ -2782,8 +2806,8 @@
receipt_address_2, receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name, receipt_address_2, receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name,
buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, bailun_category_id, buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, bailun_category_id,
bailun_category_name, gmt_create, gmt_modified, ratio_weight, ratio_price, bailun_picking_status, bailun_category_name, gmt_create, gmt_modified, ratio_weight, ratio_price, bailun_picking_status,
bailun_require_logistics, has_delete, has_scalp, logistics_method_code, logistics_method_name bailun_require_logistics, has_delete, has_scalp, logistics_method_code, logistics_method_name,
) has_innersale)
values values
(#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR},
...@@ -2822,7 +2846,7 @@ ...@@ -2822,7 +2846,7 @@
#{gmtModified,jdbcType=TIMESTAMP}, #{ratioWeight,jdbcType=DECIMAL}, #{ratioPrice,jdbcType=DECIMAL}, #{gmtModified,jdbcType=TIMESTAMP}, #{ratioWeight,jdbcType=DECIMAL}, #{ratioPrice,jdbcType=DECIMAL},
#{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}, #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR},
#{hasDelete,jdbcType=BIT}, #{hasScalp,jdbcType=BIT}, #{logisticsMethodCode,jdbcType=VARCHAR}, #{hasDelete,jdbcType=BIT}, #{hasScalp,jdbcType=BIT}, #{logisticsMethodCode,jdbcType=VARCHAR},
#{logisticsMethodName,jdbcType=VARCHAR}) #{logisticsMethodName,jdbcType=VARCHAR}, #{hasInnersale,jdbcType=BIT})
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
origin_order_id = #{originOrderId,jdbcType=VARCHAR}, origin_order_id = #{originOrderId,jdbcType=VARCHAR},
...@@ -2925,7 +2949,8 @@ ...@@ -2925,7 +2949,8 @@
has_delete = #{hasDelete,jdbcType=BIT}, has_delete = #{hasDelete,jdbcType=BIT},
has_scalp = #{hasScalp,jdbcType=BIT}, has_scalp = #{hasScalp,jdbcType=BIT},
logistics_method_code = #{logisticsMethodCode,jdbcType=VARCHAR}, logistics_method_code = #{logisticsMethodCode,jdbcType=VARCHAR},
logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR} logistics_method_name = #{logisticsMethodName,jdbcType=VARCHAR},
has_innersale = #{hasInnersale,jdbcType=BIT}
</insert> </insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsSkuExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsSkuExample" resultMap="BaseResultMap">
<!-- <!--
......
...@@ -73,7 +73,7 @@ public class OmsOrderTest { ...@@ -73,7 +73,7 @@ public class OmsOrderTest {
LinkedHashMap<String, String> map = new LinkedHashMap<>(4); LinkedHashMap<String, String> map = new LinkedHashMap<>(4);
map.put("pageIndex", "1"); map.put("pageIndex", "1");
map.put("pageCount", "100"); map.put("pageCount", "100");
map.put("OriginOrderNo", "100327755466021"); map.put("OriginOrderNo", "neigou-2019051011");
Request request = new Request.Builder() Request request = new Request.Builder()
.get() .get()
.url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map)) .url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map))
......
...@@ -791,6 +791,15 @@ public class DcBaseOmsOrder { ...@@ -791,6 +791,15 @@ public class DcBaseOmsOrder {
private Boolean hasScalp; private Boolean hasScalp;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_oms_order.has_innersale
*
* @mbg.generated
*/
private Boolean hasInnersale;
/**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_oms_order * This method corresponds to the database table dc_base_oms_order
* *
...@@ -889,6 +898,7 @@ public class DcBaseOmsOrder { ...@@ -889,6 +898,7 @@ public class DcBaseOmsOrder {
sb.append(", bailunPickingStatus=").append(bailunPickingStatus); sb.append(", bailunPickingStatus=").append(bailunPickingStatus);
sb.append(", bailunRequireLogistics=").append(bailunRequireLogistics); sb.append(", bailunRequireLogistics=").append(bailunRequireLogistics);
sb.append(", hasScalp=").append(hasScalp); sb.append(", hasScalp=").append(hasScalp);
sb.append(", hasInnersale=").append(hasInnersale);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -997,7 +1007,8 @@ public class DcBaseOmsOrder { ...@@ -997,7 +1007,8 @@ public class DcBaseOmsOrder {
&& (this.getLogisticsMethodName() == null ? other.getLogisticsMethodName() == null : this.getLogisticsMethodName().equals(other.getLogisticsMethodName())) && (this.getLogisticsMethodName() == null ? other.getLogisticsMethodName() == null : this.getLogisticsMethodName().equals(other.getLogisticsMethodName()))
&& (this.getBailunPickingStatus() == null ? other.getBailunPickingStatus() == null : this.getBailunPickingStatus().equals(other.getBailunPickingStatus())) && (this.getBailunPickingStatus() == null ? other.getBailunPickingStatus() == null : this.getBailunPickingStatus().equals(other.getBailunPickingStatus()))
&& (this.getBailunRequireLogistics() == null ? other.getBailunRequireLogistics() == null : this.getBailunRequireLogistics().equals(other.getBailunRequireLogistics())) && (this.getBailunRequireLogistics() == null ? other.getBailunRequireLogistics() == null : this.getBailunRequireLogistics().equals(other.getBailunRequireLogistics()))
&& (this.getHasScalp() == null ? other.getHasScalp() == null : this.getHasScalp().equals(other.getHasScalp())); && (this.getHasScalp() == null ? other.getHasScalp() == null : this.getHasScalp().equals(other.getHasScalp()))
&& (this.getHasInnersale() == null ? other.getHasInnersale() == null : this.getHasInnersale().equals(other.getHasInnersale()));
} }
/** /**
...@@ -1097,6 +1108,7 @@ public class DcBaseOmsOrder { ...@@ -1097,6 +1108,7 @@ public class DcBaseOmsOrder {
result = prime * result + ((getBailunPickingStatus() == null) ? 0 : getBailunPickingStatus().hashCode()); result = prime * result + ((getBailunPickingStatus() == null) ? 0 : getBailunPickingStatus().hashCode());
result = prime * result + ((getBailunRequireLogistics() == null) ? 0 : getBailunRequireLogistics().hashCode()); result = prime * result + ((getBailunRequireLogistics() == null) ? 0 : getBailunRequireLogistics().hashCode());
result = prime * result + ((getHasScalp() == null) ? 0 : getHasScalp().hashCode()); result = prime * result + ((getHasScalp() == null) ? 0 : getHasScalp().hashCode());
result = prime * result + ((getHasInnersale() == null) ? 0 : getHasInnersale().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
...@@ -926,6 +926,15 @@ public class DcBaseOmsSku { ...@@ -926,6 +926,15 @@ public class DcBaseOmsSku {
private String logisticsMethodName; private String logisticsMethodName;
/** /**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_oms_sku.has_innersale
*
* @mbg.generated
*/
private Boolean hasInnersale;
/**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_oms_sku * This method corresponds to the database table dc_base_oms_sku
* *
...@@ -1039,6 +1048,7 @@ public class DcBaseOmsSku { ...@@ -1039,6 +1048,7 @@ public class DcBaseOmsSku {
sb.append(", hasScalp=").append(hasScalp); sb.append(", hasScalp=").append(hasScalp);
sb.append(", logisticsMethodCode=").append(logisticsMethodCode); sb.append(", logisticsMethodCode=").append(logisticsMethodCode);
sb.append(", logisticsMethodName=").append(logisticsMethodName); sb.append(", logisticsMethodName=").append(logisticsMethodName);
sb.append(", hasInnersale=").append(hasInnersale);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -1162,7 +1172,8 @@ public class DcBaseOmsSku { ...@@ -1162,7 +1172,8 @@ public class DcBaseOmsSku {
&& (this.getHasDelete() == null ? other.getHasDelete() == null : this.getHasDelete().equals(other.getHasDelete())) && (this.getHasDelete() == null ? other.getHasDelete() == null : this.getHasDelete().equals(other.getHasDelete()))
&& (this.getHasScalp() == null ? other.getHasScalp() == null : this.getHasScalp().equals(other.getHasScalp())) && (this.getHasScalp() == null ? other.getHasScalp() == null : this.getHasScalp().equals(other.getHasScalp()))
&& (this.getLogisticsMethodCode() == null ? other.getLogisticsMethodCode() == null : this.getLogisticsMethodCode().equals(other.getLogisticsMethodCode())) && (this.getLogisticsMethodCode() == null ? other.getLogisticsMethodCode() == null : this.getLogisticsMethodCode().equals(other.getLogisticsMethodCode()))
&& (this.getLogisticsMethodName() == null ? other.getLogisticsMethodName() == null : this.getLogisticsMethodName().equals(other.getLogisticsMethodName())); && (this.getLogisticsMethodName() == null ? other.getLogisticsMethodName() == null : this.getLogisticsMethodName().equals(other.getLogisticsMethodName()))
&& (this.getHasInnersale() == null ? other.getHasInnersale() == null : this.getHasInnersale().equals(other.getHasInnersale()));
} }
/** /**
...@@ -1277,6 +1288,7 @@ public class DcBaseOmsSku { ...@@ -1277,6 +1288,7 @@ public class DcBaseOmsSku {
result = prime * result + ((getHasScalp() == null) ? 0 : getHasScalp().hashCode()); result = prime * result + ((getHasScalp() == null) ? 0 : getHasScalp().hashCode());
result = prime * result + ((getLogisticsMethodCode() == null) ? 0 : getLogisticsMethodCode().hashCode()); result = prime * result + ((getLogisticsMethodCode() == null) ? 0 : getLogisticsMethodCode().hashCode());
result = prime * result + ((getLogisticsMethodName() == null) ? 0 : getLogisticsMethodName().hashCode()); result = prime * result + ((getLogisticsMethodName() == null) ? 0 : getLogisticsMethodName().hashCode());
result = prime * result + ((getHasInnersale() == null) ? 0 : getHasInnersale().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
...@@ -5990,6 +5990,66 @@ public class DcBaseOmsOrderExample { ...@@ -5990,6 +5990,66 @@ public class DcBaseOmsOrderExample {
addCriterion("has_scalp not between", value1, value2, "hasScalp"); addCriterion("has_scalp not between", value1, value2, "hasScalp");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHasInnersaleIsNull() {
addCriterion("has_innersale is null");
return (Criteria) this;
}
public Criteria andHasInnersaleIsNotNull() {
addCriterion("has_innersale is not null");
return (Criteria) this;
}
public Criteria andHasInnersaleEqualTo(Boolean value) {
addCriterion("has_innersale =", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleNotEqualTo(Boolean value) {
addCriterion("has_innersale <>", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleGreaterThan(Boolean value) {
addCriterion("has_innersale >", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleGreaterThanOrEqualTo(Boolean value) {
addCriterion("has_innersale >=", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleLessThan(Boolean value) {
addCriterion("has_innersale <", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleLessThanOrEqualTo(Boolean value) {
addCriterion("has_innersale <=", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleIn(List<Boolean> values) {
addCriterion("has_innersale in", values, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleNotIn(List<Boolean> values) {
addCriterion("has_innersale not in", values, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleBetween(Boolean value1, Boolean value2) {
addCriterion("has_innersale between", value1, value2, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleNotBetween(Boolean value1, Boolean value2) {
addCriterion("has_innersale not between", value1, value2, "hasInnersale");
return (Criteria) this;
}
} }
/** /**
......
...@@ -6950,6 +6950,66 @@ public class DcBaseOmsSkuExample { ...@@ -6950,6 +6950,66 @@ public class DcBaseOmsSkuExample {
addCriterion("logistics_method_name not between", value1, value2, "logisticsMethodName"); addCriterion("logistics_method_name not between", value1, value2, "logisticsMethodName");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andHasInnersaleIsNull() {
addCriterion("has_innersale is null");
return (Criteria) this;
}
public Criteria andHasInnersaleIsNotNull() {
addCriterion("has_innersale is not null");
return (Criteria) this;
}
public Criteria andHasInnersaleEqualTo(Boolean value) {
addCriterion("has_innersale =", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleNotEqualTo(Boolean value) {
addCriterion("has_innersale <>", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleGreaterThan(Boolean value) {
addCriterion("has_innersale >", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleGreaterThanOrEqualTo(Boolean value) {
addCriterion("has_innersale >=", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleLessThan(Boolean value) {
addCriterion("has_innersale <", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleLessThanOrEqualTo(Boolean value) {
addCriterion("has_innersale <=", value, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleIn(List<Boolean> values) {
addCriterion("has_innersale in", values, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleNotIn(List<Boolean> values) {
addCriterion("has_innersale not in", values, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleBetween(Boolean value1, Boolean value2) {
addCriterion("has_innersale between", value1, value2, "hasInnersale");
return (Criteria) this;
}
public Criteria andHasInnersaleNotBetween(Boolean value1, Boolean value2) {
addCriterion("has_innersale not between", value1, value2, "hasInnersale");
return (Criteria) this;
}
} }
/** /**
......
...@@ -854,6 +854,7 @@ ...@@ -854,6 +854,7 @@
AND bailun_order_status in ('Handling','Finished') AND bailun_order_status in ('Handling','Finished')
AND has_delete = 0 AND has_delete = 0
AND has_scalp = 0 AND has_scalp = 0
AND has_innersale = 0
GROUP BY GROUP BY
bailun_sku, bailun_sku,
warehouse_code warehouse_code
......
...@@ -595,6 +595,7 @@ ...@@ -595,6 +595,7 @@
and platform_type != 'FBA' and platform_type != 'FBA'
and has_delete = 0 and has_delete = 0
and has_scalp = 0 and has_scalp = 0
and has_innersale = 0
and paid_time >= '2019-03-01 12:00:00' and paid_time >= '2019-03-01 12:00:00'
and bailun_sku_quantity_ordered > bailun_sku_quantity_picked and bailun_sku_quantity_ordered > bailun_sku_quantity_picked
GROUP BY GROUP BY
...@@ -649,6 +650,7 @@ ...@@ -649,6 +650,7 @@
and platform_type != 'FBA' and platform_type != 'FBA'
and has_delete = 0 and has_delete = 0
and has_scalp = 0 and has_scalp = 0
and has_innersale = 0
and paid_time >= '2019-03-01 12:00:00' and paid_time >= '2019-03-01 12:00:00'
and bailun_sku_quantity_ordered > bailun_sku_quantity_shipped and bailun_sku_quantity_ordered > bailun_sku_quantity_shipped
GROUP BY GROUP BY
......
...@@ -2434,6 +2434,7 @@ ...@@ -2434,6 +2434,7 @@
and bailun_order_status in ('Handling','Finished') and bailun_order_status in ('Handling','Finished')
and has_delete = 0 and has_delete = 0
and has_scalp = 0 and has_scalp = 0
and has_innersale = 0
and bailun_sku = #{bailunSku} and bailun_sku = #{bailunSku}
and warehouse_code = #{warehouseCode}) sales_table and warehouse_code = #{warehouseCode}) sales_table
</select> </select>
...@@ -2453,5 +2454,6 @@ ...@@ -2453,5 +2454,6 @@
AND bailun_order_status IN ( 'Handling', 'Finished' ) AND bailun_order_status IN ( 'Handling', 'Finished' )
AND has_delete = 0 AND has_delete = 0
AND has_scalp = 0 AND has_scalp = 0
AND has_innersale = 0
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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