Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
dc-java
Commits
b5446692
Commit
b5446692
authored
Apr 24, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动周转加入加权日均销量字段
parent
be9ee0c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
13 deletions
+119
-13
DcAutoTurnover.java
...main/java/com/bailuntec/domain/entity/DcAutoTurnover.java
+14
-1
DcAutoTurnoverExample.java
...a/com/bailuntec/domain/example/DcAutoTurnoverExample.java
+60
-0
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+8
-4
DcAutoTurnoverMapper.xml
...c/main/java/com/bailuntec/mapper/DcAutoTurnoverMapper.xml
+37
-8
No files found.
data-common/src/main/java/com/bailuntec/domain/entity/DcAutoTurnover.java
View file @
b5446692
...
@@ -575,6 +575,15 @@ public class DcAutoTurnover {
...
@@ -575,6 +575,15 @@ public class DcAutoTurnover {
private
BigDecimal
historyThirtydaySalesEbay
;
private
BigDecimal
historyThirtydaySalesEbay
;
/**
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_turnover.daily_weighted_sales
*
* @mbg.generated
*/
private
BigDecimal
dailyWeightedSales
;
/**
* 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
*
*
...
@@ -649,6 +658,7 @@ public class DcAutoTurnover {
...
@@ -649,6 +658,7 @@ public class DcAutoTurnover {
sb
.
append
(
", historySevendaySalesEbay="
).
append
(
historySevendaySalesEbay
);
sb
.
append
(
", historySevendaySalesEbay="
).
append
(
historySevendaySalesEbay
);
sb
.
append
(
", historyFourteendaySalesEbay="
).
append
(
historyFourteendaySalesEbay
);
sb
.
append
(
", historyFourteendaySalesEbay="
).
append
(
historyFourteendaySalesEbay
);
sb
.
append
(
", historyThirtydaySalesEbay="
).
append
(
historyThirtydaySalesEbay
);
sb
.
append
(
", historyThirtydaySalesEbay="
).
append
(
historyThirtydaySalesEbay
);
sb
.
append
(
", dailyWeightedSales="
).
append
(
dailyWeightedSales
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
@@ -733,7 +743,8 @@ public class DcAutoTurnover {
...
@@ -733,7 +743,8 @@ public class DcAutoTurnover {
&&
(
this
.
getSuppliersName
()
==
null
?
other
.
getSuppliersName
()
==
null
:
this
.
getSuppliersName
().
equals
(
other
.
getSuppliersName
()))
&&
(
this
.
getSuppliersName
()
==
null
?
other
.
getSuppliersName
()
==
null
:
this
.
getSuppliersName
().
equals
(
other
.
getSuppliersName
()))
&&
(
this
.
getHistorySevendaySalesEbay
()
==
null
?
other
.
getHistorySevendaySalesEbay
()
==
null
:
this
.
getHistorySevendaySalesEbay
().
equals
(
other
.
getHistorySevendaySalesEbay
()))
&&
(
this
.
getHistorySevendaySalesEbay
()
==
null
?
other
.
getHistorySevendaySalesEbay
()
==
null
:
this
.
getHistorySevendaySalesEbay
().
equals
(
other
.
getHistorySevendaySalesEbay
()))
&&
(
this
.
getHistoryFourteendaySalesEbay
()
==
null
?
other
.
getHistoryFourteendaySalesEbay
()
==
null
:
this
.
getHistoryFourteendaySalesEbay
().
equals
(
other
.
getHistoryFourteendaySalesEbay
()))
&&
(
this
.
getHistoryFourteendaySalesEbay
()
==
null
?
other
.
getHistoryFourteendaySalesEbay
()
==
null
:
this
.
getHistoryFourteendaySalesEbay
().
equals
(
other
.
getHistoryFourteendaySalesEbay
()))
&&
(
this
.
getHistoryThirtydaySalesEbay
()
==
null
?
other
.
getHistoryThirtydaySalesEbay
()
==
null
:
this
.
getHistoryThirtydaySalesEbay
().
equals
(
other
.
getHistoryThirtydaySalesEbay
()));
&&
(
this
.
getHistoryThirtydaySalesEbay
()
==
null
?
other
.
getHistoryThirtydaySalesEbay
()
==
null
:
this
.
getHistoryThirtydaySalesEbay
().
equals
(
other
.
getHistoryThirtydaySalesEbay
()))
&&
(
this
.
getDailyWeightedSales
()
==
null
?
other
.
getDailyWeightedSales
()
==
null
:
this
.
getDailyWeightedSales
().
equals
(
other
.
getDailyWeightedSales
()));
}
}
/**
/**
...
@@ -809,6 +820,7 @@ public class DcAutoTurnover {
...
@@ -809,6 +820,7 @@ public class DcAutoTurnover {
result
=
prime
*
result
+
((
getHistorySevendaySalesEbay
()
==
null
)
?
0
:
getHistorySevendaySalesEbay
().
hashCode
());
result
=
prime
*
result
+
((
getHistorySevendaySalesEbay
()
==
null
)
?
0
:
getHistorySevendaySalesEbay
().
hashCode
());
result
=
prime
*
result
+
((
getHistoryFourteendaySalesEbay
()
==
null
)
?
0
:
getHistoryFourteendaySalesEbay
().
hashCode
());
result
=
prime
*
result
+
((
getHistoryFourteendaySalesEbay
()
==
null
)
?
0
:
getHistoryFourteendaySalesEbay
().
hashCode
());
result
=
prime
*
result
+
((
getHistoryThirtydaySalesEbay
()
==
null
)
?
0
:
getHistoryThirtydaySalesEbay
().
hashCode
());
result
=
prime
*
result
+
((
getHistoryThirtydaySalesEbay
()
==
null
)
?
0
:
getHistoryThirtydaySalesEbay
().
hashCode
());
result
=
prime
*
result
+
((
getDailyWeightedSales
()
==
null
)
?
0
:
getDailyWeightedSales
().
hashCode
());
return
result
;
return
result
;
}
}
}
}
\ No newline at end of file
data-common/src/main/java/com/bailuntec/domain/example/DcAutoTurnoverExample.java
View file @
b5446692
...
@@ -4320,6 +4320,66 @@ public class DcAutoTurnoverExample {
...
@@ -4320,6 +4320,66 @@ public class DcAutoTurnoverExample {
addCriterion
(
"history_thirtyday_sales_ebay not between"
,
value1
,
value2
,
"historyThirtydaySalesEbay"
);
addCriterion
(
"history_thirtyday_sales_ebay not between"
,
value1
,
value2
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andDailyWeightedSalesIsNull
()
{
addCriterion
(
"daily_weighted_sales is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesIsNotNull
()
{
addCriterion
(
"daily_weighted_sales is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"daily_weighted_sales ="
,
value
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"daily_weighted_sales <>"
,
value
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"daily_weighted_sales >"
,
value
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"daily_weighted_sales >="
,
value
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesLessThan
(
BigDecimal
value
)
{
addCriterion
(
"daily_weighted_sales <"
,
value
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"daily_weighted_sales <="
,
value
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"daily_weighted_sales in"
,
values
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"daily_weighted_sales not in"
,
values
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"daily_weighted_sales between"
,
value1
,
value2
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDailyWeightedSalesNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"daily_weighted_sales not between"
,
value1
,
value2
,
"dailyWeightedSales"
);
return
(
Criteria
)
this
;
}
}
}
/**
/**
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
b5446692
...
@@ -8,7 +8,6 @@ import com.bailuntec.domain.constant.Constant;
...
@@ -8,7 +8,6 @@ import com.bailuntec.domain.constant.Constant;
import
com.bailuntec.domain.dto.CatagoryDTO
;
import
com.bailuntec.domain.dto.CatagoryDTO
;
import
com.bailuntec.domain.dto.SalesVolumeAvgDTO
;
import
com.bailuntec.domain.dto.SalesVolumeAvgDTO
;
import
com.bailuntec.domain.dto.SalesVolumeDTO
;
import
com.bailuntec.domain.dto.SalesVolumeDTO
;
import
com.bailuntec.domain.dto.TurnoverSkuDTO
;
import
com.bailuntec.domain.entity.*
;
import
com.bailuntec.domain.entity.*
;
import
com.bailuntec.domain.enumerate.PlatformType
;
import
com.bailuntec.domain.enumerate.PlatformType
;
import
com.bailuntec.domain.example.*
;
import
com.bailuntec.domain.example.*
;
...
@@ -20,7 +19,9 @@ import com.bailuntec.utils.PropertiesUtil;
...
@@ -20,7 +19,9 @@ import com.bailuntec.utils.PropertiesUtil;
import
com.bailuntec.utils.SessionUtil
;
import
com.bailuntec.utils.SessionUtil
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
okhttp3.*
;
import
okhttp3.OkHttpClient
;
import
okhttp3.Request
;
import
okhttp3.Response
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -297,7 +298,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -297,7 +298,7 @@ public class AutoTurnoverJob extends PointJob {
* 可以支持配置
* 可以支持配置
* 2019-04-22更新 不管逾期
* 2019-04-22更新 不管逾期
*/
*/
BigDecimal
totalSafeInventory
=
calculateSafeInventory
(
bailunSku
,
warehouseCode
,
bailunFirstLevelCatagoryId
,
dcAutoSales
,
JSON
.
toJSONString
(
forecastSalesList
));
BigDecimal
totalSafeInventory
=
calculateSafeInventory
(
bailunSku
,
warehouseCode
,
bailunFirstLevelCatagoryId
,
dcAutoSales
,
JSON
.
toJSONString
(
forecastSalesList
)
,
dcAutoTurnover
);
Integer
moq
=
turnoverSku
.
getMoq
();
Integer
moq
=
turnoverSku
.
getMoq
();
/*
/*
...
@@ -984,7 +985,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -984,7 +985,7 @@ public class AutoTurnoverJob extends PointJob {
}
}
private
BigDecimal
calculateSafeInventory
(
String
bailunSku
,
String
warehouseCode
,
Integer
private
BigDecimal
calculateSafeInventory
(
String
bailunSku
,
String
warehouseCode
,
Integer
bailunFirstLevelCatagoryId
,
DcAutoSales
dcAutoSales
,
String
forecastSalesListJson
)
throws
Exception
{
bailunFirstLevelCatagoryId
,
DcAutoSales
dcAutoSales
,
String
forecastSalesListJson
,
DcAutoTurnover
dcAutoTurnover
)
{
/*
/*
* 手动设置
* 手动设置
* 1. 根据仓库 + SKU在表里找dc_auto_config_safe_inventory
* 1. 根据仓库 + SKU在表里找dc_auto_config_safe_inventory
...
@@ -1039,6 +1040,8 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1039,6 +1040,8 @@ public class AutoTurnoverJob extends PointJob {
dcAutoConfigSafeInventory
=
autoConfigSafeInventoryMapper
.
selectOneByExample
(
DcAutoConfigSafeInventoryExample
.
newAndCreateCriteria
().
andVariableCodeEqualTo
(
""
).
andWarehouseCodeEqualTo
(
warehouseCode
).
andStatusEqualTo
(
1
).
andTypeEqualTo
(
3
).
example
());
dcAutoConfigSafeInventory
=
autoConfigSafeInventoryMapper
.
selectOneByExample
(
DcAutoConfigSafeInventoryExample
.
newAndCreateCriteria
().
andVariableCodeEqualTo
(
""
).
andWarehouseCodeEqualTo
(
warehouseCode
).
andStatusEqualTo
(
1
).
andTypeEqualTo
(
3
).
example
());
if
(
dcAutoConfigSafeInventory
!=
null
)
{
if
(
dcAutoConfigSafeInventory
!=
null
)
{
weightingAvgSales
=
caculateWeightingAvgSales
(
dcAutoConfigSafeInventory
.
getWeightingCoefficientSeven
(),
dcAutoConfigSafeInventory
.
getWeightingCoefficientFourteen
(),
dcAutoConfigSafeInventory
.
getWeightingCoefficientThirty
(),
historyThirtySalesList
);
weightingAvgSales
=
caculateWeightingAvgSales
(
dcAutoConfigSafeInventory
.
getWeightingCoefficientSeven
(),
dcAutoConfigSafeInventory
.
getWeightingCoefficientFourteen
(),
dcAutoConfigSafeInventory
.
getWeightingCoefficientThirty
(),
historyThirtySalesList
);
//进来这里就存一份没乘倍数的加权日均销量
dcAutoTurnover
.
setDailyWeightedSales
(
weightingAvgSales
);
if
(
weightingAvgSales
.
compareTo
(
BigDecimal
.
ONE
)
==
1
)
{
if
(
weightingAvgSales
.
compareTo
(
BigDecimal
.
ONE
)
==
1
)
{
weightingAvgSales
=
weightingAvgSales
.
multiply
(
dcAutoConfigSafeInventory
.
getParam
()).
setScale
(
3
,
RoundingMode
.
HALF_EVEN
);
weightingAvgSales
=
weightingAvgSales
.
multiply
(
dcAutoConfigSafeInventory
.
getParam
()).
setScale
(
3
,
RoundingMode
.
HALF_EVEN
);
}
else
{
}
else
{
...
@@ -1047,6 +1050,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1047,6 +1050,7 @@ public class AutoTurnoverJob extends PointJob {
}
else
{
}
else
{
//啥配置都没有就给个默认取值
//啥配置都没有就给个默认取值
weightingAvgSales
=
caculateWeightingAvgSales
(
BigDecimal
.
valueOf
(
0.3
),
BigDecimal
.
valueOf
(
0.3
),
BigDecimal
.
valueOf
(
0.4
),
historyThirtySalesList
);
weightingAvgSales
=
caculateWeightingAvgSales
(
BigDecimal
.
valueOf
(
0.3
),
BigDecimal
.
valueOf
(
0.3
),
BigDecimal
.
valueOf
(
0.4
),
historyThirtySalesList
);
dcAutoTurnover
.
setDailyWeightedSales
(
weightingAvgSales
);
}
}
}
}
}
}
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/mapper/DcAutoTurnoverMapper.xml
View file @
b5446692
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
<result
column=
"history_sevenday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historySevendaySalesEbay"
/>
<result
column=
"history_sevenday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historySevendaySalesEbay"
/>
<result
column=
"history_fourteenday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historyFourteendaySalesEbay"
/>
<result
column=
"history_fourteenday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historyFourteendaySalesEbay"
/>
<result
column=
"history_thirtyday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historyThirtydaySalesEbay"
/>
<result
column=
"history_thirtyday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historyThirtydaySalesEbay"
/>
<result
column=
"daily_weighted_sales"
jdbcType=
"DECIMAL"
property=
"dailyWeightedSales"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<!--
<!--
...
@@ -154,7 +155,7 @@
...
@@ -154,7 +155,7 @@
history_thirtyday_sales, sales_explain_details, forecast_turnoverday_sales, stock_up_sales,
history_thirtyday_sales, sales_explain_details, forecast_turnoverday_sales, stock_up_sales,
quantity_begin_advise, stock_up_days, payment_before_delivery, product_code, product_inner_code,
quantity_begin_advise, stock_up_days, payment_before_delivery, product_code, product_inner_code,
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_thirtyday_sales_ebay
, daily_weighted_sales
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoTurnoverExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoTurnoverExample"
resultMap=
"BaseResultMap"
>
<!--
<!--
...
@@ -239,7 +240,8 @@
...
@@ -239,7 +240,8 @@
payment_before_delivery, product_code, product_inner_code,
payment_before_delivery, product_code, product_inner_code,
bailun_category_id, buyer_name, suppliers_name,
bailun_category_id, buyer_name, suppliers_name,
history_sevenday_sales_ebay, history_fourteenday_sales_ebay,
history_sevenday_sales_ebay, history_fourteenday_sales_ebay,
history_thirtyday_sales_ebay)
history_thirtyday_sales_ebay, daily_weighted_sales
)
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},
...
@@ -264,7 +266,8 @@
...
@@ -264,7 +266,8 @@
#{paymentBeforeDelivery,jdbcType=INTEGER}, #{productCode,jdbcType=VARCHAR}, #{productInnerCode,jdbcType=VARCHAR},
#{paymentBeforeDelivery,jdbcType=INTEGER}, #{productCode,jdbcType=VARCHAR}, #{productInnerCode,jdbcType=VARCHAR},
#{bailunCategoryId,jdbcType=INTEGER}, #{buyerName,jdbcType=VARCHAR}, #{suppliersName,jdbcType=VARCHAR},
#{bailunCategoryId,jdbcType=INTEGER}, #{buyerName,jdbcType=VARCHAR}, #{suppliersName,jdbcType=VARCHAR},
#{historySevendaySalesEbay,jdbcType=DECIMAL}, #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
#{historySevendaySalesEbay,jdbcType=DECIMAL}, #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
#{historyThirtydaySalesEbay,jdbcType=DECIMAL})
#{historyThirtydaySalesEbay,jdbcType=DECIMAL}, #{dailyWeightedSales,jdbcType=DECIMAL}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.bailuntec.domain.entity.DcAutoTurnover"
>
<insert
id=
"insertSelective"
parameterType=
"com.bailuntec.domain.entity.DcAutoTurnover"
>
<!--
<!--
...
@@ -462,6 +465,9 @@
...
@@ -462,6 +465,9 @@
<if
test=
"historyThirtydaySalesEbay != null"
>
<if
test=
"historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay,
history_thirtyday_sales_ebay,
</if>
</if>
<if
test=
"dailyWeightedSales != null"
>
daily_weighted_sales,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -653,6 +659,9 @@
...
@@ -653,6 +659,9 @@
<if
test=
"historyThirtydaySalesEbay != null"
>
<if
test=
"historyThirtydaySalesEbay != null"
>
#{historyThirtydaySalesEbay,jdbcType=DECIMAL},
#{historyThirtydaySalesEbay,jdbcType=DECIMAL},
</if>
</if>
<if
test=
"dailyWeightedSales != null"
>
#{dailyWeightedSales,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"
>
...
@@ -861,6 +870,9 @@
...
@@ -861,6 +870,9 @@
<if
test=
"record.historyThirtydaySalesEbay != null"
>
<if
test=
"record.historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,jdbcType=DECIMAL},
</if>
</if>
<if
test=
"record.dailyWeightedSales != null"
>
daily_weighted_sales = #{record.dailyWeightedSales,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"
/>
...
@@ -934,7 +946,8 @@
...
@@ -934,7 +946,8 @@
suppliers_name = #{record.suppliersName,jdbcType=VARCHAR},
suppliers_name = #{record.suppliersName,jdbcType=VARCHAR},
history_sevenday_sales_ebay = #{record.historySevendaySalesEbay,jdbcType=DECIMAL},
history_sevenday_sales_ebay = #{record.historySevendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{record.historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{record.historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,jdbcType=DECIMAL}
history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,jdbcType=DECIMAL},
daily_weighted_sales = #{record.dailyWeightedSales,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>
...
@@ -1132,6 +1145,9 @@
...
@@ -1132,6 +1145,9 @@
<if
test=
"historyThirtydaySalesEbay != null"
>
<if
test=
"historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
</if>
</if>
<if
test=
"dailyWeightedSales != null"
>
daily_weighted_sales = #{dailyWeightedSales,jdbcType=DECIMAL},
</if>
</set>
</set>
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
...
@@ -1202,7 +1218,8 @@
...
@@ -1202,7 +1218,8 @@
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL}
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
daily_weighted_sales = #{dailyWeightedSales,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"
>
...
@@ -1402,6 +1419,9 @@
...
@@ -1402,6 +1419,9 @@
<if
test=
"historyThirtydaySalesEbay != null"
>
<if
test=
"historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay,
history_thirtyday_sales_ebay,
</if>
</if>
<if
test=
"dailyWeightedSales != null"
>
daily_weighted_sales,
</if>
</trim>
</trim>
values
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
@@ -1594,6 +1614,9 @@
...
@@ -1594,6 +1614,9 @@
<if
test=
"historyThirtydaySalesEbay != null"
>
<if
test=
"historyThirtydaySalesEbay != null"
>
#{historyThirtydaySalesEbay,jdbcType=DECIMAL},
#{historyThirtydaySalesEbay,jdbcType=DECIMAL},
</if>
</if>
<if
test=
"dailyWeightedSales != null"
>
#{dailyWeightedSales,jdbcType=DECIMAL},
</if>
</trim>
</trim>
on duplicate key update
on duplicate key update
<trim
suffixOverrides=
","
>
<trim
suffixOverrides=
","
>
...
@@ -1786,6 +1809,9 @@
...
@@ -1786,6 +1809,9 @@
<if
test=
"historyThirtydaySalesEbay != null"
>
<if
test=
"historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
</if>
</if>
<if
test=
"dailyWeightedSales != null"
>
daily_weighted_sales = #{dailyWeightedSales,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"
>
...
@@ -1809,7 +1835,7 @@
...
@@ -1809,7 +1835,7 @@
forecast_turnoverday_sales, stock_up_sales, quantity_begin_advise, stock_up_days,
forecast_turnoverday_sales, stock_up_sales, quantity_begin_advise, stock_up_days,
payment_before_delivery, product_code, product_inner_code, bailun_category_id,
payment_before_delivery, product_code, product_inner_code, bailun_category_id,
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_thirtyday_sales_ebay
, daily_weighted_sales
)
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},
...
@@ -1835,7 +1861,8 @@
...
@@ -1835,7 +1861,8 @@
#{paymentBeforeDelivery,jdbcType=INTEGER}, #{productCode,jdbcType=VARCHAR}, #{productInnerCode,jdbcType=VARCHAR},
#{paymentBeforeDelivery,jdbcType=INTEGER}, #{productCode,jdbcType=VARCHAR}, #{productInnerCode,jdbcType=VARCHAR},
#{bailunCategoryId,jdbcType=INTEGER}, #{buyerName,jdbcType=VARCHAR}, #{suppliersName,jdbcType=VARCHAR},
#{bailunCategoryId,jdbcType=INTEGER}, #{buyerName,jdbcType=VARCHAR}, #{suppliersName,jdbcType=VARCHAR},
#{historySevendaySalesEbay,jdbcType=DECIMAL}, #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
#{historySevendaySalesEbay,jdbcType=DECIMAL}, #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
#{historyThirtydaySalesEbay,jdbcType=DECIMAL})
#{historyThirtydaySalesEbay,jdbcType=DECIMAL}, #{dailyWeightedSales,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},
...
@@ -1899,7 +1926,8 @@
...
@@ -1899,7 +1926,8 @@
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL}
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
daily_weighted_sales = #{dailyWeightedSales,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"
>
<!--
<!--
...
@@ -1920,6 +1948,7 @@
...
@@ -1920,6 +1948,7 @@
</select>
</select>
<delete
id=
"truncateAutoInboundTable"
>
<delete
id=
"truncateAutoInboundTable"
>
TRUNCATE dc_auto_inbound
TRUNCATE dc_auto_inbound
</delete>
</delete>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment