Commit 4f5a6807 by yinyong

Merge remote-tracking branch 'origin/master'

parents ae22940f 3a69b45b
......@@ -73,7 +73,7 @@ public class OmsOrderTest {
LinkedHashMap<String, String> map = new LinkedHashMap<>(4);
map.put("pageIndex", "1");
map.put("pageCount", "100");
map.put("OriginOrderNo", "S02-9738824-8579305");
map.put("OriginOrderNo", "263709100694-2446617013016");
Request request = new Request.Builder()
.get()
.url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map))
......
......@@ -431,5 +431,7 @@ public class SkuInfo {
@JSONField(name = "wareList")
public List<WarehouseInfo> warehouseList;
public Integer categorySimpleId;
public String categorySimpleName;
}
......@@ -73,6 +73,8 @@
<result column="has_delete" jdbcType="BIT" property="hasDelete" />
<result column="develop_time" jdbcType="TIMESTAMP" property="developTime" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="category_simple_id" jdbcType="INTEGER" property="categorySimpleId" />
<result column="category_simple_name" jdbcType="VARCHAR" property="categorySimpleName" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -154,7 +156,8 @@
size_image, sales_price, enable, inspection_hours, bargainer, customs_code, declare_title_en,
declare_title_cn, pick_title_cn, pick_title_en, product_nature, charger_specifications,
packing_price, packing_name, packing_size, product_size, packing_weight, unit, push_status,
transfer_delivery, source, push_time, has_delete, develop_time, company_id
transfer_delivery, source, push_time, has_delete, develop_time, company_id, category_simple_id,
category_simple_name
</sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseSkuExample" resultMap="BaseResultMap">
<!--
......@@ -237,7 +240,8 @@
product_size, packing_weight, unit,
push_status, transfer_delivery, source,
push_time, has_delete, develop_time,
company_id)
company_id, category_simple_id, category_simple_name
)
values (#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{skuImage,jdbcType=VARCHAR},
#{categoryId,jdbcType=INTEGER}, #{categoryName,jdbcType=VARCHAR}, #{unitPrice,jdbcType=DECIMAL},
#{sellerId,jdbcType=INTEGER}, #{sellerName,jdbcType=VARCHAR}, #{length,jdbcType=DECIMAL},
......@@ -260,7 +264,8 @@
#{productSize,jdbcType=VARCHAR}, #{packingWeight,jdbcType=DECIMAL}, #{unit,jdbcType=VARCHAR},
#{pushStatus,jdbcType=TINYINT}, #{transferDelivery,jdbcType=INTEGER}, #{source,jdbcType=TINYINT},
#{pushTime,jdbcType=TIMESTAMP}, #{hasDelete,jdbcType=BIT}, #{developTime,jdbcType=TIMESTAMP},
#{companyId,jdbcType=INTEGER})
#{companyId,jdbcType=INTEGER}, #{categorySimpleId,jdbcType=INTEGER}, #{categorySimpleName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseSku">
<!--
......@@ -470,6 +475,12 @@
<if test="companyId != null">
company_id,
</if>
<if test="categorySimpleId != null">
category_simple_id,
</if>
<if test="categorySimpleName != null">
category_simple_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -673,6 +684,12 @@
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="categorySimpleId != null">
#{categorySimpleId,jdbcType=INTEGER},
</if>
<if test="categorySimpleName != null">
#{categorySimpleName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseSkuExample" resultType="java.lang.Long">
......@@ -893,6 +910,12 @@
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.categorySimpleId != null">
category_simple_id = #{record.categorySimpleId,jdbcType=INTEGER},
</if>
<if test="record.categorySimpleName != null">
category_simple_name = #{record.categorySimpleName,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -970,7 +993,9 @@
push_time = #{record.pushTime,jdbcType=TIMESTAMP},
has_delete = #{record.hasDelete,jdbcType=BIT},
develop_time = #{record.developTime,jdbcType=TIMESTAMP},
company_id = #{record.companyId,jdbcType=INTEGER}
company_id = #{record.companyId,jdbcType=INTEGER},
category_simple_id = #{record.categorySimpleId,jdbcType=INTEGER},
category_simple_name = #{record.categorySimpleName,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -1180,6 +1205,12 @@
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="categorySimpleId != null">
category_simple_id = #{categorySimpleId,jdbcType=INTEGER},
</if>
<if test="categorySimpleName != null">
category_simple_name = #{categorySimpleName,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
......@@ -1254,7 +1285,9 @@
push_time = #{pushTime,jdbcType=TIMESTAMP},
has_delete = #{hasDelete,jdbcType=BIT},
develop_time = #{developTime,jdbcType=TIMESTAMP},
company_id = #{companyId,jdbcType=INTEGER}
company_id = #{companyId,jdbcType=INTEGER},
category_simple_id = #{categorySimpleId,jdbcType=INTEGER},
category_simple_name = #{categorySimpleName,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseSku">
......@@ -1466,6 +1499,12 @@
<if test="companyId != null">
company_id,
</if>
<if test="categorySimpleId != null">
category_simple_id,
</if>
<if test="categorySimpleName != null">
category_simple_name,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -1670,6 +1709,12 @@
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="categorySimpleId != null">
#{categorySimpleId,jdbcType=INTEGER},
</if>
<if test="categorySimpleName != null">
#{categorySimpleName,jdbcType=VARCHAR},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
......@@ -1874,6 +1919,12 @@
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="categorySimpleId != null">
category_simple_id = #{categorySimpleId,jdbcType=INTEGER},
</if>
<if test="categorySimpleName != null">
category_simple_name = #{categorySimpleName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseSku">
......@@ -1892,8 +1943,8 @@
size_image, sales_price, enable, inspection_hours, bargainer, customs_code, declare_title_en,
declare_title_cn, pick_title_cn, pick_title_en, product_nature, charger_specifications,
packing_price, packing_name, packing_size, product_size, packing_weight, unit,
push_status, transfer_delivery, source, push_time, has_delete, develop_time, company_id
)
push_status, transfer_delivery, source, push_time, has_delete, develop_time, company_id,
category_simple_id, category_simple_name)
values
(#{id,jdbcType=INTEGER}, #{bailunSku,jdbcType=VARCHAR}, #{skuImage,jdbcType=VARCHAR},
#{categoryId,jdbcType=INTEGER}, #{categoryName,jdbcType=VARCHAR}, #{unitPrice,jdbcType=DECIMAL},
......@@ -1917,7 +1968,8 @@
#{productSize,jdbcType=VARCHAR}, #{packingWeight,jdbcType=DECIMAL}, #{unit,jdbcType=VARCHAR},
#{pushStatus,jdbcType=TINYINT}, #{transferDelivery,jdbcType=INTEGER}, #{source,jdbcType=TINYINT},
#{pushTime,jdbcType=TIMESTAMP}, #{hasDelete,jdbcType=BIT}, #{developTime,jdbcType=TIMESTAMP},
#{companyId,jdbcType=INTEGER})
#{companyId,jdbcType=INTEGER}, #{categorySimpleId,jdbcType=INTEGER}, #{categorySimpleName,jdbcType=VARCHAR}
)
on duplicate key update
id = #{id,jdbcType=INTEGER},
bailun_sku = #{bailunSku,jdbcType=VARCHAR},
......@@ -1985,7 +2037,9 @@
push_time = #{pushTime,jdbcType=TIMESTAMP},
has_delete = #{hasDelete,jdbcType=BIT},
develop_time = #{developTime,jdbcType=TIMESTAMP},
company_id = #{companyId,jdbcType=INTEGER}
company_id = #{companyId,jdbcType=INTEGER},
category_simple_id = #{categorySimpleId,jdbcType=INTEGER},
category_simple_name = #{categorySimpleName,jdbcType=VARCHAR}
</insert>
<select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseSkuExample" resultMap="BaseResultMap">
<!--
......
......@@ -8,9 +8,9 @@ public class SyncSkuTest {
@Test
public void test() {
SkuMSSyncJob skuSyncJob = new SkuMSSyncJob();
skuSyncJob.executeJob(null, new JobPointLog("base-sku",1 ,1000,1,1,
LocalDateTime.of(2019,5,29,0,0),
LocalDateTime.of(2019,5,30,0,0)));
skuSyncJob.executeJob(null, new JobPointLog("base-sku",100 ,1000,1,1,
LocalDateTime.of(2019,7,9,16,52),
LocalDateTime.of(2019,7,10,16,53)));
}
}
......@@ -611,6 +611,24 @@ public class DcBaseSku {
private Integer companyId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku.category_simple_id
*
* @mbg.generated
*/
private Integer categorySimpleId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_sku.category_simple_name
*
* @mbg.generated
*/
private String categorySimpleName;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dc_base_sku
*
......@@ -689,6 +707,8 @@ public class DcBaseSku {
sb.append(", hasDelete=").append(hasDelete);
sb.append(", developTime=").append(developTime);
sb.append(", companyId=").append(companyId);
sb.append(", categorySimpleId=").append(categorySimpleId);
sb.append(", categorySimpleName=").append(categorySimpleName);
sb.append("]");
return sb.toString();
}
......@@ -777,7 +797,9 @@ public class DcBaseSku {
&& (this.getPushTime() == null ? other.getPushTime() == null : this.getPushTime().equals(other.getPushTime()))
&& (this.getHasDelete() == null ? other.getHasDelete() == null : this.getHasDelete().equals(other.getHasDelete()))
&& (this.getDevelopTime() == null ? other.getDevelopTime() == null : this.getDevelopTime().equals(other.getDevelopTime()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()));
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getCategorySimpleId() == null ? other.getCategorySimpleId() == null : this.getCategorySimpleId().equals(other.getCategorySimpleId()))
&& (this.getCategorySimpleName() == null ? other.getCategorySimpleName() == null : this.getCategorySimpleName().equals(other.getCategorySimpleName()));
}
/**
......@@ -857,6 +879,8 @@ public class DcBaseSku {
result = prime * result + ((getHasDelete() == null) ? 0 : getHasDelete().hashCode());
result = prime * result + ((getDevelopTime() == null) ? 0 : getDevelopTime().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getCategorySimpleId() == null) ? 0 : getCategorySimpleId().hashCode());
result = prime * result + ((getCategorySimpleName() == null) ? 0 : getCategorySimpleName().hashCode());
return result;
}
}
\ No newline at end of file
......@@ -4710,6 +4710,136 @@ public class DcBaseSkuExample {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdIsNull() {
addCriterion("category_simple_id is null");
return (Criteria) this;
}
public Criteria andCategorySimpleIdIsNotNull() {
addCriterion("category_simple_id is not null");
return (Criteria) this;
}
public Criteria andCategorySimpleIdEqualTo(Integer value) {
addCriterion("category_simple_id =", value, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdNotEqualTo(Integer value) {
addCriterion("category_simple_id <>", value, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdGreaterThan(Integer value) {
addCriterion("category_simple_id >", value, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdGreaterThanOrEqualTo(Integer value) {
addCriterion("category_simple_id >=", value, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdLessThan(Integer value) {
addCriterion("category_simple_id <", value, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdLessThanOrEqualTo(Integer value) {
addCriterion("category_simple_id <=", value, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdIn(List<Integer> values) {
addCriterion("category_simple_id in", values, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdNotIn(List<Integer> values) {
addCriterion("category_simple_id not in", values, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdBetween(Integer value1, Integer value2) {
addCriterion("category_simple_id between", value1, value2, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleIdNotBetween(Integer value1, Integer value2) {
addCriterion("category_simple_id not between", value1, value2, "categorySimpleId");
return (Criteria) this;
}
public Criteria andCategorySimpleNameIsNull() {
addCriterion("category_simple_name is null");
return (Criteria) this;
}
public Criteria andCategorySimpleNameIsNotNull() {
addCriterion("category_simple_name is not null");
return (Criteria) this;
}
public Criteria andCategorySimpleNameEqualTo(String value) {
addCriterion("category_simple_name =", value, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameNotEqualTo(String value) {
addCriterion("category_simple_name <>", value, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameGreaterThan(String value) {
addCriterion("category_simple_name >", value, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameGreaterThanOrEqualTo(String value) {
addCriterion("category_simple_name >=", value, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameLessThan(String value) {
addCriterion("category_simple_name <", value, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameLessThanOrEqualTo(String value) {
addCriterion("category_simple_name <=", value, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameLike(String value) {
addCriterion("category_simple_name like", value, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameNotLike(String value) {
addCriterion("category_simple_name not like", value, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameIn(List<String> values) {
addCriterion("category_simple_name in", values, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameNotIn(List<String> values) {
addCriterion("category_simple_name not in", values, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameBetween(String value1, String value2) {
addCriterion("category_simple_name between", value1, value2, "categorySimpleName");
return (Criteria) this;
}
public Criteria andCategorySimpleNameNotBetween(String value1, String value2) {
addCriterion("category_simple_name not between", value1, value2, "categorySimpleName");
return (Criteria) this;
}
}
/**
......
......@@ -603,11 +603,8 @@
tb1.warehouse_code,
sum(tb1.count) count
FROM dc_base_transfer_bale tb1
LEFT JOIN dc_base_transfer_complete tb2 ON tb1.deleted = tb2.deleted
AND tb1.bailun_sku = tb2.bailun_sku
AND tb1.warehouse_code = tb2.warehouse_code
AND tb1.transfer_order_id = tb2.transfer_order_id
WHERE tb2.bailun_sku IS NULL
LEFT JOIN dc_base_transfer_complete tb2 ON tb1.transfer_order_id = tb2.transfer_order_id
WHERE tb2.transfer_order_id IS NULL
AND tb1.deleted = 0
GROUP BY bailun_sku,
warehouse_code
......@@ -622,11 +619,8 @@
max(tb1.count) count,
tb1.transfer_order_id
FROM dc_base_transfer_inbound tb1
LEFT JOIN dc_base_transfer_complete tb2 ON tb2.deleted = 0
AND tb1.bailun_sku = tb2.bailun_sku
AND tb1.warehouse_code = tb2.warehouse_code
AND tb1.transfer_order_id = tb2.transfer_order_id
WHERE tb2.bailun_sku IS NULL
LEFT JOIN dc_base_transfer_complete tb2 ON tb1.transfer_order_id = tb2.transfer_order_id
WHERE tb2.transfer_order_id IS NULL
AND tb1.deleted = 0
GROUP BY bailun_sku,
warehouse_code,
......
......@@ -628,10 +628,7 @@ FROM
sum( tb1.count ) count
FROM
dc_base_transfer_bale tb1
LEFT JOIN dc_base_transfer_complete tb2 ON tb1.deleted = tb2.deleted
AND tb1.bailun_sku = tb2.bailun_sku
AND tb1.warehouse_code = tb2.warehouse_code
AND tb1.transfer_order_id = tb2.transfer_order_id
LEFT JOIN dc_base_transfer_complete tb2 ON tb1.transfer_order_id = tb2.transfer_order_id
WHERE
tb2.bailun_sku IS NULL
AND tb1.bailun_sku = #{bailunSku}
......@@ -652,10 +649,7 @@ FROM
sum( tb1.count ) count
FROM
dc_base_transfer_verify tb1
LEFT JOIN dc_base_transfer_complete tb2 ON tb1.deleted = tb2.deleted
AND tb1.bailun_sku = tb2.bailun_sku
AND tb1.warehouse_code = tb2.warehouse_code
AND tb1.transfer_order_id = tb2.transfer_order_id
LEFT JOIN dc_base_transfer_complete tb2 ON tb1.transfer_order_id = tb2.transfer_order_id
WHERE
tb2.bailun_sku IS NULL
AND tb1.bailun_sku = #{bailunSku}
......@@ -683,10 +677,7 @@ FROM
tb1.transfer_order_id
FROM
dc_base_transfer_inbound tb1
LEFT JOIN dc_base_transfer_complete tb2 ON tb2.deleted = 0
AND tb1.bailun_sku = tb2.bailun_sku
AND tb1.warehouse_code = tb2.warehouse_code
AND tb1.transfer_order_id = tb2.transfer_order_id
LEFT JOIN dc_base_transfer_complete tb2 ON tb1.transfer_order_id = tb2.transfer_order_id
WHERE
tb2.bailun_sku IS NULL
AND tb1.bailun_sku = #{bailunSku}
......@@ -706,7 +697,7 @@ FROM
AND tb5.transfer_order_id = tb4.transfer_order_id
WHERE
( tb11.count - IFNULL( tb4.count, 0 ) ) > 0
union select bailun_sku,warehouse_code,transfer_plan_order_id,null,update_time,count from dc_base_transfer_plan where status = 1 and deleted=0 AND bailun_sku = #{bailunSku}
union all select bailun_sku,warehouse_code,transfer_plan_order_id,null,update_time,count from dc_base_transfer_plan where status = 1 and deleted=0 AND bailun_sku = #{bailunSku}
AND warehouse_code = #{warehouseCode}
</select>
</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