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
4d0370a6
Commit
4d0370a6
authored
Apr 18, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动周转给指定平台加上三天平均销量
parent
3265627f
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
382 additions
and
451 deletions
+382
-451
DcAutoTurnover.java
...main/java/com/bailuntec/domain/entity/DcAutoTurnover.java
+38
-1
DcAutoTurnoverExample.java
...a/com/bailuntec/domain/example/DcAutoTurnoverExample.java
+180
-0
CatagoryDTO.java
...r/src/main/java/com/bailuntec/domain/dto/CatagoryDTO.java
+3
-150
SalesVolumeAvgDTO.java
...main/java/com/bailuntec/domain/dto/SalesVolumeAvgDTO.java
+22
-0
SalesVolumeDTO.java
...rc/main/java/com/bailuntec/domain/dto/SalesVolumeDTO.java
+3
-287
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+20
-0
DcAutoSalesMapper.java
...src/main/java/com/bailuntec/mapper/DcAutoSalesMapper.java
+5
-0
DcAutoSalesMapper.xml
.../src/main/java/com/bailuntec/mapper/DcAutoSalesMapper.xml
+18
-0
DcAutoTurnoverMapper.xml
...c/main/java/com/bailuntec/mapper/DcAutoTurnoverMapper.xml
+91
-11
AutoTurnoverTest.java
...ow/show-auto-turnover/src/test/java/AutoTurnoverTest.java
+1
-1
init.properties
mybatis-generator/src/main/resources/init.properties
+1
-1
No files found.
data-common/src/main/java/com/bailuntec/domain/entity/DcAutoTurnover.java
View file @
4d0370a6
...
@@ -548,6 +548,33 @@ public class DcAutoTurnover {
...
@@ -548,6 +548,33 @@ public class DcAutoTurnover {
private
String
suppliersName
;
private
String
suppliersName
;
/**
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_turnover.history_sevenday_sales_ebay
*
* @mbg.generated
*/
private
BigDecimal
historySevendaySalesEbay
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_turnover.history_fourteenday_sales_ebay
*
* @mbg.generated
*/
private
BigDecimal
historyFourteendaySalesEbay
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_turnover.history_thirtyday_sales_ebay
*
* @mbg.generated
*/
private
BigDecimal
historyThirtydaySalesEbay
;
/**
* 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
*
*
...
@@ -619,6 +646,9 @@ public class DcAutoTurnover {
...
@@ -619,6 +646,9 @@ public class DcAutoTurnover {
sb
.
append
(
", bailunCategoryId="
).
append
(
bailunCategoryId
);
sb
.
append
(
", bailunCategoryId="
).
append
(
bailunCategoryId
);
sb
.
append
(
", buyerName="
).
append
(
buyerName
);
sb
.
append
(
", buyerName="
).
append
(
buyerName
);
sb
.
append
(
", suppliersName="
).
append
(
suppliersName
);
sb
.
append
(
", suppliersName="
).
append
(
suppliersName
);
sb
.
append
(
", historySevendaySalesEbay="
).
append
(
historySevendaySalesEbay
);
sb
.
append
(
", historyFourteendaySalesEbay="
).
append
(
historyFourteendaySalesEbay
);
sb
.
append
(
", historyThirtydaySalesEbay="
).
append
(
historyThirtydaySalesEbay
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
@@ -700,7 +730,10 @@ public class DcAutoTurnover {
...
@@ -700,7 +730,10 @@ public class DcAutoTurnover {
&&
(
this
.
getProductInnerCode
()
==
null
?
other
.
getProductInnerCode
()
==
null
:
this
.
getProductInnerCode
().
equals
(
other
.
getProductInnerCode
()))
&&
(
this
.
getProductInnerCode
()
==
null
?
other
.
getProductInnerCode
()
==
null
:
this
.
getProductInnerCode
().
equals
(
other
.
getProductInnerCode
()))
&&
(
this
.
getBailunCategoryId
()
==
null
?
other
.
getBailunCategoryId
()
==
null
:
this
.
getBailunCategoryId
().
equals
(
other
.
getBailunCategoryId
()))
&&
(
this
.
getBailunCategoryId
()
==
null
?
other
.
getBailunCategoryId
()
==
null
:
this
.
getBailunCategoryId
().
equals
(
other
.
getBailunCategoryId
()))
&&
(
this
.
getBuyerName
()
==
null
?
other
.
getBuyerName
()
==
null
:
this
.
getBuyerName
().
equals
(
other
.
getBuyerName
()))
&&
(
this
.
getBuyerName
()
==
null
?
other
.
getBuyerName
()
==
null
:
this
.
getBuyerName
().
equals
(
other
.
getBuyerName
()))
&&
(
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
.
getHistoryFourteendaySalesEbay
()
==
null
?
other
.
getHistoryFourteendaySalesEbay
()
==
null
:
this
.
getHistoryFourteendaySalesEbay
().
equals
(
other
.
getHistoryFourteendaySalesEbay
()))
&&
(
this
.
getHistoryThirtydaySalesEbay
()
==
null
?
other
.
getHistoryThirtydaySalesEbay
()
==
null
:
this
.
getHistoryThirtydaySalesEbay
().
equals
(
other
.
getHistoryThirtydaySalesEbay
()));
}
}
/**
/**
...
@@ -773,6 +806,9 @@ public class DcAutoTurnover {
...
@@ -773,6 +806,9 @@ public class DcAutoTurnover {
result
=
prime
*
result
+
((
getBailunCategoryId
()
==
null
)
?
0
:
getBailunCategoryId
().
hashCode
());
result
=
prime
*
result
+
((
getBailunCategoryId
()
==
null
)
?
0
:
getBailunCategoryId
().
hashCode
());
result
=
prime
*
result
+
((
getBuyerName
()
==
null
)
?
0
:
getBuyerName
().
hashCode
());
result
=
prime
*
result
+
((
getBuyerName
()
==
null
)
?
0
:
getBuyerName
().
hashCode
());
result
=
prime
*
result
+
((
getSuppliersName
()
==
null
)
?
0
:
getSuppliersName
().
hashCode
());
result
=
prime
*
result
+
((
getSuppliersName
()
==
null
)
?
0
:
getSuppliersName
().
hashCode
());
result
=
prime
*
result
+
((
getHistorySevendaySalesEbay
()
==
null
)
?
0
:
getHistorySevendaySalesEbay
().
hashCode
());
result
=
prime
*
result
+
((
getHistoryFourteendaySalesEbay
()
==
null
)
?
0
:
getHistoryFourteendaySalesEbay
().
hashCode
());
result
=
prime
*
result
+
((
getHistoryThirtydaySalesEbay
()
==
null
)
?
0
:
getHistoryThirtydaySalesEbay
().
hashCode
());
return
result
;
return
result
;
}
}
}
}
\ No newline at end of file
data-common/src/main/java/com/bailuntec/domain/example/DcAutoTurnoverExample.java
View file @
4d0370a6
...
@@ -4140,6 +4140,186 @@ public class DcAutoTurnoverExample {
...
@@ -4140,6 +4140,186 @@ public class DcAutoTurnoverExample {
addCriterion
(
"suppliers_name not between"
,
value1
,
value2
,
"suppliersName"
);
addCriterion
(
"suppliers_name not between"
,
value1
,
value2
,
"suppliersName"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andHistorySevendaySalesEbayIsNull
()
{
addCriterion
(
"history_sevenday_sales_ebay is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayIsNotNull
()
{
addCriterion
(
"history_sevenday_sales_ebay is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_sevenday_sales_ebay ="
,
value
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_sevenday_sales_ebay <>"
,
value
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"history_sevenday_sales_ebay >"
,
value
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_sevenday_sales_ebay >="
,
value
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayLessThan
(
BigDecimal
value
)
{
addCriterion
(
"history_sevenday_sales_ebay <"
,
value
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_sevenday_sales_ebay <="
,
value
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"history_sevenday_sales_ebay in"
,
values
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"history_sevenday_sales_ebay not in"
,
values
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"history_sevenday_sales_ebay between"
,
value1
,
value2
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistorySevendaySalesEbayNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"history_sevenday_sales_ebay not between"
,
value1
,
value2
,
"historySevendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayIsNull
()
{
addCriterion
(
"history_fourteenday_sales_ebay is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayIsNotNull
()
{
addCriterion
(
"history_fourteenday_sales_ebay is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_fourteenday_sales_ebay ="
,
value
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_fourteenday_sales_ebay <>"
,
value
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"history_fourteenday_sales_ebay >"
,
value
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_fourteenday_sales_ebay >="
,
value
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayLessThan
(
BigDecimal
value
)
{
addCriterion
(
"history_fourteenday_sales_ebay <"
,
value
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_fourteenday_sales_ebay <="
,
value
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"history_fourteenday_sales_ebay in"
,
values
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"history_fourteenday_sales_ebay not in"
,
values
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"history_fourteenday_sales_ebay between"
,
value1
,
value2
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryFourteendaySalesEbayNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"history_fourteenday_sales_ebay not between"
,
value1
,
value2
,
"historyFourteendaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayIsNull
()
{
addCriterion
(
"history_thirtyday_sales_ebay is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayIsNotNull
()
{
addCriterion
(
"history_thirtyday_sales_ebay is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_thirtyday_sales_ebay ="
,
value
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_thirtyday_sales_ebay <>"
,
value
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"history_thirtyday_sales_ebay >"
,
value
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_thirtyday_sales_ebay >="
,
value
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayLessThan
(
BigDecimal
value
)
{
addCriterion
(
"history_thirtyday_sales_ebay <"
,
value
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"history_thirtyday_sales_ebay <="
,
value
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"history_thirtyday_sales_ebay in"
,
values
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"history_thirtyday_sales_ebay not in"
,
values
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"history_thirtyday_sales_ebay between"
,
value1
,
value2
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andHistoryThirtydaySalesEbayNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"history_thirtyday_sales_ebay not between"
,
value1
,
value2
,
"historyThirtydaySalesEbay"
);
return
(
Criteria
)
this
;
}
}
}
/**
/**
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/domain/dto/CatagoryDTO.java
View file @
4d0370a6
package
com
.
bailuntec
.
domain
.
dto
;
package
com
.
bailuntec
.
domain
.
dto
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
@Data
public
class
CatagoryDTO
{
public
class
CatagoryDTO
{
private
Integer
c_id
;
private
Integer
c_id
;
private
Integer
c_parentid
;
private
Integer
c_parentid
;
...
@@ -23,155 +26,5 @@ public class CatagoryDTO {
...
@@ -23,155 +26,5 @@ public class CatagoryDTO {
private
String
c_updateuser
;
private
String
c_updateuser
;
private
Date
c_updatetime
;
private
Date
c_updatetime
;
public
Integer
getC_id
()
{
return
c_id
;
}
public
void
setC_id
(
Integer
c_id
)
{
this
.
c_id
=
c_id
;
}
public
Integer
getC_parentid
()
{
return
c_parentid
;
}
public
void
setC_parentid
(
Integer
c_parentid
)
{
this
.
c_parentid
=
c_parentid
;
}
public
String
getC_ename
()
{
return
c_ename
;
}
public
void
setC_ename
(
String
c_ename
)
{
this
.
c_ename
=
c_ename
;
}
public
String
getC_cname
()
{
return
c_cname
;
}
public
void
setC_cname
(
String
c_cname
)
{
this
.
c_cname
=
c_cname
;
}
public
Integer
getC_level
()
{
return
c_level
;
}
public
void
setC_level
(
Integer
c_level
)
{
this
.
c_level
=
c_level
;
}
public
Integer
getC_groupid
()
{
return
c_groupid
;
}
public
void
setC_groupid
(
Integer
c_groupid
)
{
this
.
c_groupid
=
c_groupid
;
}
public
Integer
getC_sort
()
{
return
c_sort
;
}
public
void
setC_sort
(
Integer
c_sort
)
{
this
.
c_sort
=
c_sort
;
}
public
Integer
getC_charger_spec
()
{
return
c_charger_spec
;
}
public
void
setC_charger_spec
(
Integer
c_charger_spec
)
{
this
.
c_charger_spec
=
c_charger_spec
;
}
public
String
getC_product_character
()
{
return
c_product_character
;
}
public
void
setC_product_character
(
String
c_product_character
)
{
this
.
c_product_character
=
c_product_character
;
}
public
String
getC_bailun_character
()
{
return
c_bailun_character
;
}
public
void
setC_bailun_character
(
String
c_bailun_character
)
{
this
.
c_bailun_character
=
c_bailun_character
;
}
public
String
getC_cpeihuo
()
{
return
c_cpeihuo
;
}
public
void
setC_cpeihuo
(
String
c_cpeihuo
)
{
this
.
c_cpeihuo
=
c_cpeihuo
;
}
public
String
getC_epeihuo
()
{
return
c_epeihuo
;
}
public
void
setC_epeihuo
(
String
c_epeihuo
)
{
this
.
c_epeihuo
=
c_epeihuo
;
}
public
String
getC_cbaoguan
()
{
return
c_cbaoguan
;
}
public
void
setC_cbaoguan
(
String
c_cbaoguan
)
{
this
.
c_cbaoguan
=
c_cbaoguan
;
}
public
String
getC_ebaoguan
()
{
return
c_ebaoguan
;
}
public
void
setC_ebaoguan
(
String
c_ebaoguan
)
{
this
.
c_ebaoguan
=
c_ebaoguan
;
}
public
String
getC_hscode
()
{
return
c_hscode
;
}
public
void
setC_hscode
(
String
c_hscode
)
{
this
.
c_hscode
=
c_hscode
;
}
public
String
getC_createuser
()
{
return
c_createuser
;
}
public
void
setC_createuser
(
String
c_createuser
)
{
this
.
c_createuser
=
c_createuser
;
}
public
Date
getC_createtime
()
{
return
c_createtime
;
}
public
void
setC_createtime
(
Date
c_createtime
)
{
this
.
c_createtime
=
c_createtime
;
}
public
String
getC_updateuser
()
{
return
c_updateuser
;
}
public
void
setC_updateuser
(
String
c_updateuser
)
{
this
.
c_updateuser
=
c_updateuser
;
}
public
Date
getC_updatetime
()
{
return
c_updatetime
;
}
public
void
setC_updatetime
(
Date
c_updatetime
)
{
this
.
c_updatetime
=
c_updatetime
;
}
}
}
data-show/show-auto-turnover/src/main/java/com/bailuntec/domain/dto/SalesVolumeAvgDTO.java
0 → 100644
View file @
4d0370a6
package
com
.
bailuntec
.
domain
.
dto
;
import
lombok.Data
;
@Data
public
class
SalesVolumeAvgDTO
{
private
Integer
sevendaySales
;
private
Integer
fourteendaySales
;
private
Integer
thirtydaySales
;
public
SalesVolumeAvgDTO
()
{
}
public
SalesVolumeAvgDTO
(
String
bailunSku
,
String
warehouseCode
)
{
this
.
thirtydaySales
=
0
;
this
.
sevendaySales
=
0
;
this
.
fourteendaySales
=
0
;
}
}
data-show/show-auto-turnover/src/main/java/com/bailuntec/domain/dto/SalesVolumeDTO.java
View file @
4d0370a6
package
com
.
bailuntec
.
domain
.
dto
;
package
com
.
bailuntec
.
domain
.
dto
;
import
lombok.Data
;
@Data
public
class
SalesVolumeDTO
{
public
class
SalesVolumeDTO
{
private
String
bailunSku
;
private
String
bailunSku
;
private
String
warehouseCode
;
private
String
warehouseCode
;
...
@@ -80,291 +83,4 @@ public class SalesVolumeDTO {
...
@@ -80,291 +83,4 @@ public class SalesVolumeDTO {
this
.
historySales
=
"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
;
this
.
historySales
=
"0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
;
}
}
public
String
getHistorySales
()
{
return
historySales
;
}
public
void
setHistorySales
(
String
historySales
)
{
this
.
historySales
=
historySales
;
}
public
String
getCategoryId
()
{
return
categoryId
;
}
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getBailunSku
()
{
return
bailunSku
;
}
public
void
setBailunSku
(
String
bailunSku
)
{
this
.
bailunSku
=
bailunSku
;
}
public
String
getWarehouseCode
()
{
return
warehouseCode
;
}
public
void
setWarehouseCode
(
String
warehouseCode
)
{
this
.
warehouseCode
=
warehouseCode
;
}
public
String
getWarehouseName
()
{
return
warehouseName
;
}
public
void
setWarehouseName
(
String
warehouseName
)
{
this
.
warehouseName
=
warehouseName
;
}
public
Integer
getOnedaySales
()
{
return
onedaySales
;
}
public
void
setOnedaySales
(
Integer
onedaySales
)
{
this
.
onedaySales
=
onedaySales
;
}
public
Integer
getTwodaySales
()
{
return
twodaySales
;
}
public
void
setTwodaySales
(
Integer
twodaySales
)
{
this
.
twodaySales
=
twodaySales
;
}
public
Integer
getThreedaySales
()
{
return
threedaySales
;
}
public
void
setThreedaySales
(
Integer
threedaySales
)
{
this
.
threedaySales
=
threedaySales
;
}
public
Integer
getFourthdaySales
()
{
return
fourthdaySales
;
}
public
void
setFourthdaySales
(
Integer
fourthdaySales
)
{
this
.
fourthdaySales
=
fourthdaySales
;
}
public
Integer
getFivedaySales
()
{
return
fivedaySales
;
}
public
void
setFivedaySales
(
Integer
fivedaySales
)
{
this
.
fivedaySales
=
fivedaySales
;
}
public
Integer
getSixdaySales
()
{
return
sixdaySales
;
}
public
void
setSixdaySales
(
Integer
sixdaySales
)
{
this
.
sixdaySales
=
sixdaySales
;
}
public
Integer
getSevendaySales
()
{
return
sevendaySales
;
}
public
void
setSevendaySales
(
Integer
sevendaySales
)
{
this
.
sevendaySales
=
sevendaySales
;
}
public
Integer
getEightdaySales
()
{
return
eightdaySales
;
}
public
void
setEightdaySales
(
Integer
eightdaySales
)
{
this
.
eightdaySales
=
eightdaySales
;
}
public
Integer
getNinedaySales
()
{
return
ninedaySales
;
}
public
void
setNinedaySales
(
Integer
ninedaySales
)
{
this
.
ninedaySales
=
ninedaySales
;
}
public
Integer
getTendaySales
()
{
return
tendaySales
;
}
public
void
setTendaySales
(
Integer
tendaySales
)
{
this
.
tendaySales
=
tendaySales
;
}
public
Integer
getElevendaySales
()
{
return
elevendaySales
;
}
public
void
setElevendaySales
(
Integer
elevendaySales
)
{
this
.
elevendaySales
=
elevendaySales
;
}
public
Integer
getTwelvedaySales
()
{
return
twelvedaySales
;
}
public
void
setTwelvedaySales
(
Integer
twelvedaySales
)
{
this
.
twelvedaySales
=
twelvedaySales
;
}
public
Integer
getThridteendaySales
()
{
return
thridteendaySales
;
}
public
void
setThridteendaySales
(
Integer
thridteendaySales
)
{
this
.
thridteendaySales
=
thridteendaySales
;
}
public
Integer
getFourteendaySales
()
{
return
fourteendaySales
;
}
public
void
setFourteendaySales
(
Integer
fourteendaySales
)
{
this
.
fourteendaySales
=
fourteendaySales
;
}
public
Integer
getFifteendaySales
()
{
return
fifteendaySales
;
}
public
void
setFifteendaySales
(
Integer
fifteendaySales
)
{
this
.
fifteendaySales
=
fifteendaySales
;
}
public
Integer
getSixteendaySales
()
{
return
sixteendaySales
;
}
public
void
setSixteendaySales
(
Integer
sixteendaySales
)
{
this
.
sixteendaySales
=
sixteendaySales
;
}
public
Integer
getSeventeendaySales
()
{
return
seventeendaySales
;
}
public
void
setSeventeendaySales
(
Integer
seventeendaySales
)
{
this
.
seventeendaySales
=
seventeendaySales
;
}
public
Integer
getEighteendaySales
()
{
return
eighteendaySales
;
}
public
void
setEighteendaySales
(
Integer
eighteendaySales
)
{
this
.
eighteendaySales
=
eighteendaySales
;
}
public
Integer
getNineteendaySales
()
{
return
nineteendaySales
;
}
public
void
setNineteendaySales
(
Integer
nineteendaySales
)
{
this
.
nineteendaySales
=
nineteendaySales
;
}
public
Integer
getTwentydaySales
()
{
return
twentydaySales
;
}
public
void
setTwentydaySales
(
Integer
twentydaySales
)
{
this
.
twentydaySales
=
twentydaySales
;
}
public
Integer
getTwentyOnedaySales
()
{
return
twentyOnedaySales
;
}
public
void
setTwentyOnedaySales
(
Integer
twentyOnedaySales
)
{
this
.
twentyOnedaySales
=
twentyOnedaySales
;
}
public
Integer
getTwentyTwodaySales
()
{
return
twentyTwodaySales
;
}
public
void
setTwentyTwodaySales
(
Integer
twentyTwodaySales
)
{
this
.
twentyTwodaySales
=
twentyTwodaySales
;
}
public
Integer
getTwentyThreedaySales
()
{
return
twentyThreedaySales
;
}
public
void
setTwentyThreedaySales
(
Integer
twentyThreedaySales
)
{
this
.
twentyThreedaySales
=
twentyThreedaySales
;
}
public
Integer
getTwentyFourthdaySales
()
{
return
twentyFourthdaySales
;
}
public
void
setTwentyFourthdaySales
(
Integer
twentyFourthdaySales
)
{
this
.
twentyFourthdaySales
=
twentyFourthdaySales
;
}
public
Integer
getTwentyFivedaySales
()
{
return
twentyFivedaySales
;
}
public
void
setTwentyFivedaySales
(
Integer
twentyFivedaySales
)
{
this
.
twentyFivedaySales
=
twentyFivedaySales
;
}
public
Integer
getTwentySixdaySales
()
{
return
twentySixdaySales
;
}
public
void
setTwentySixdaySales
(
Integer
twentySixdaySales
)
{
this
.
twentySixdaySales
=
twentySixdaySales
;
}
public
Integer
getTwentySevenedaySales
()
{
return
twentySevenedaySales
;
}
public
void
setTwentySevenedaySales
(
Integer
twentySevenedaySales
)
{
this
.
twentySevenedaySales
=
twentySevenedaySales
;
}
public
Integer
getTwentyEightdaySales
()
{
return
twentyEightdaySales
;
}
public
void
setTwentyEightdaySales
(
Integer
twentyEightdaySales
)
{
this
.
twentyEightdaySales
=
twentyEightdaySales
;
}
public
Integer
getTwentyNinedaySales
()
{
return
twentyNinedaySales
;
}
public
void
setTwentyNinedaySales
(
Integer
twentyNinedaySales
)
{
this
.
twentyNinedaySales
=
twentyNinedaySales
;
}
public
Integer
getThirtydaySales
()
{
return
thirtydaySales
;
}
public
void
setThirtydaySales
(
Integer
thirtydaySales
)
{
this
.
thirtydaySales
=
thirtydaySales
;
}
}
}
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
4d0370a6
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.TypeReference;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.TypeReference;
import
com.bailuntec.domain.constant.CommonConstant
;
import
com.bailuntec.domain.constant.CommonConstant
;
import
com.bailuntec.domain.constant.Constant
;
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.SalesVolumeDTO
;
import
com.bailuntec.domain.dto.SalesVolumeDTO
;
import
com.bailuntec.domain.dto.TurnoverSkuDTO
;
import
com.bailuntec.domain.dto.TurnoverSkuDTO
;
import
com.bailuntec.domain.entity.*
;
import
com.bailuntec.domain.entity.*
;
...
@@ -436,6 +437,10 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -436,6 +437,10 @@ public class AutoTurnoverJob extends PointJob {
}
}
}
}
/*
* dcAutoTurnover这个表单独给指定平台加上三天平均销量
*/
caculatePlatformAvgSales
(
dcAutoTurnover
);
dcAutoTurnover
.
setSuppliersName
(
turnoverSku
.
getSuppliersName
());
dcAutoTurnover
.
setSuppliersName
(
turnoverSku
.
getSuppliersName
());
dcAutoTurnover
.
setBuyerName
(
turnoverSku
.
getBuyerName
());
dcAutoTurnover
.
setBuyerName
(
turnoverSku
.
getBuyerName
());
dcAutoTurnover
.
setBailunCategoryId
(
turnoverSku
.
getBailunCategoryId
());
dcAutoTurnover
.
setBailunCategoryId
(
turnoverSku
.
getBailunCategoryId
());
...
@@ -501,6 +506,21 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -501,6 +506,21 @@ public class AutoTurnoverJob extends PointJob {
}
}
}
}
private
void
caculatePlatformAvgSales
(
DcAutoTurnover
dcAutoTurnover
)
{
try
{
DcAutoSalesMapper
mapper
=
SessionUtil
.
getSession
().
getMapper
(
DcAutoSalesMapper
.
class
);
SalesVolumeAvgDTO
ebayAvgSales
=
mapper
.
getPlatformHistorySales
(
dcAutoTurnover
.
getBailunSku
(),
dcAutoTurnover
.
getWarehouseCode
(),
PlatformType
.
Ebay
.
value
());
dcAutoTurnover
.
setHistorySevendaySalesEbay
(
BigDecimal
.
valueOf
(
ebayAvgSales
.
getSevendaySales
()).
divide
(
Constant
.
BIGDECIMAL_SEVEN
,
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
));
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"计算平台的平均销量失败"
,
e
);
}
finally
{
SessionUtil
.
closeSession
();
}
}
private
Integer
getStockUpDays
(
String
warehouseCode
)
{
private
Integer
getStockUpDays
(
String
warehouseCode
)
{
DcAutoConfigStockUpDaysMapper
mapper
=
SessionUtil
.
getSession
().
getMapper
(
DcAutoConfigStockUpDaysMapper
.
class
);
DcAutoConfigStockUpDaysMapper
mapper
=
SessionUtil
.
getSession
().
getMapper
(
DcAutoConfigStockUpDaysMapper
.
class
);
DcAutoConfigStockUpDays
dcAutoConfigStockUpDays
=
mapper
.
selectOneByExample
(
DcAutoConfigStockUpDaysExample
.
newAndCreateCriteria
().
andWarehouseCodeEqualTo
(
warehouseCode
).
example
());
DcAutoConfigStockUpDays
dcAutoConfigStockUpDays
=
mapper
.
selectOneByExample
(
DcAutoConfigStockUpDaysExample
.
newAndCreateCriteria
().
andWarehouseCodeEqualTo
(
warehouseCode
).
example
());
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/mapper/DcAutoSalesMapper.java
View file @
4d0370a6
package
com
.
bailuntec
.
mapper
;
package
com
.
bailuntec
.
mapper
;
import
com.bailuntec.domain.dto.SalesVolumeAvgDTO
;
import
com.bailuntec.domain.dto.SalesVolumeDTO
;
import
com.bailuntec.domain.dto.SalesVolumeDTO
;
import
com.bailuntec.domain.entity.DcAutoSales
;
import
com.bailuntec.domain.entity.DcAutoSales
;
import
com.bailuntec.domain.entity.DcAutoTurnover
;
import
com.bailuntec.domain.example.DcAutoSalesExample
;
import
com.bailuntec.domain.example.DcAutoSalesExample
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -124,4 +126,6 @@ public interface DcAutoSalesMapper {
...
@@ -124,4 +126,6 @@ public interface DcAutoSalesMapper {
int
upsertSelective
(
DcAutoSales
record
);
int
upsertSelective
(
DcAutoSales
record
);
SalesVolumeDTO
getSalesVolumeDTO
(
@Param
(
"queryTime"
)
String
queryTime
,
@Param
(
"bailunSku"
)
String
bailunSku
,
@Param
(
"warehouseCode"
)
String
warehouseCode
);
SalesVolumeDTO
getSalesVolumeDTO
(
@Param
(
"queryTime"
)
String
queryTime
,
@Param
(
"bailunSku"
)
String
bailunSku
,
@Param
(
"warehouseCode"
)
String
warehouseCode
);
SalesVolumeAvgDTO
getPlatformHistorySales
(
@Param
(
"bailunSku"
)
String
bailunSku
,
@Param
(
"warehouseCode"
)
String
warehouseCode
,
@Param
(
"platform"
)
String
platform
);
}
}
\ No newline at end of file
data-show/show-auto-turnover/src/main/java/com/bailuntec/mapper/DcAutoSalesMapper.xml
View file @
4d0370a6
...
@@ -2437,4 +2437,21 @@
...
@@ -2437,4 +2437,21 @@
and bailun_sku = #{bailunSku}
and bailun_sku = #{bailunSku}
and warehouse_code = #{warehouseCode}) sales_table
and warehouse_code = #{warehouseCode}) sales_table
</select>
</select>
<select
id=
"getPlatformHistorySales"
resultType=
"com.bailuntec.domain.dto.SalesVolumeAvgDTO"
>
SELECT
sum( CASE WHEN ( paid_time >= DATE_SUB( CURDATE( ), INTERVAL 7 DAY ) ) THEN bailun_sku_quantity_ordered ELSE 0 END ) AS 'sevenday_sales',
sum( CASE WHEN ( paid_time >= DATE_SUB( CURDATE( ), INTERVAL 14 DAY ) ) THEN bailun_sku_quantity_ordered ELSE 0 END ) AS 'fourteenday_sales',
sum( CASE WHEN ( paid_time >= DATE_SUB( CURDATE( ), INTERVAL 30 DAY ) ) THEN bailun_sku_quantity_ordered ELSE 0 END ) AS 'thirtyday_sales'
FROM
`dc_base_oms_sku`
WHERE
platform_type = #{platform}
AND bailun_sku = #{bailunSku,jdbcType=VARCHAR}
AND warehouse_code= #{warehouseCode,jdbcType=VARCHAR}
AND paid_time >= DATE_SUB( CURDATE( ), INTERVAL 30 DAY )
AND paid_time
<
CURDATE( )
AND bailun_order_status IN ( 'Handling', 'Finished' )
AND has_delete = 0
AND has_scalp = 0
</select>
</mapper>
</mapper>
\ No newline at end of file
data-show/show-auto-turnover/src/main/java/com/bailuntec/mapper/DcAutoTurnoverMapper.xml
View file @
4d0370a6
...
@@ -66,6 +66,9 @@
...
@@ -66,6 +66,9 @@
<result
column=
"bailun_category_id"
jdbcType=
"INTEGER"
property=
"bailunCategoryId"
/>
<result
column=
"bailun_category_id"
jdbcType=
"INTEGER"
property=
"bailunCategoryId"
/>
<result
column=
"buyer_name"
jdbcType=
"VARCHAR"
property=
"buyerName"
/>
<result
column=
"buyer_name"
jdbcType=
"VARCHAR"
property=
"buyerName"
/>
<result
column=
"suppliers_name"
jdbcType=
"VARCHAR"
property=
"suppliersName"
/>
<result
column=
"suppliers_name"
jdbcType=
"VARCHAR"
property=
"suppliersName"
/>
<result
column=
"history_sevenday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historySevendaySalesEbay"
/>
<result
column=
"history_fourteenday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historyFourteendaySalesEbay"
/>
<result
column=
"history_thirtyday_sales_ebay"
jdbcType=
"DECIMAL"
property=
"historyThirtydaySalesEbay"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<!--
<!--
...
@@ -150,7 +153,8 @@
...
@@ -150,7 +153,8 @@
supplementary_sales, turnover_sales, turnover_inbound, history_sevenday_sales, history_fourteenday_sales,
supplementary_sales, turnover_sales, turnover_inbound, history_sevenday_sales, history_fourteenday_sales,
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
bailun_category_id, buyer_name, suppliers_name, history_sevenday_sales_ebay, history_fourteenday_sales_ebay,
history_thirtyday_sales_ebay
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoTurnoverExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.bailuntec.domain.example.DcAutoTurnoverExample"
resultMap=
"BaseResultMap"
>
<!--
<!--
...
@@ -233,8 +237,9 @@
...
@@ -233,8 +237,9 @@
sales_explain_details, forecast_turnoverday_sales,
sales_explain_details, forecast_turnoverday_sales,
stock_up_sales, quantity_begin_advise, stock_up_days,
stock_up_sales, quantity_begin_advise, stock_up_days,
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_thirtyday_sales_ebay)
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},
...
@@ -257,8 +262,9 @@
...
@@ -257,8 +262,9 @@
#{salesExplainDetails,jdbcType=VARCHAR}, #{forecastTurnoverdaySales,jdbcType=DECIMAL},
#{salesExplainDetails,jdbcType=VARCHAR}, #{forecastTurnoverdaySales,jdbcType=DECIMAL},
#{stockUpSales,jdbcType=DECIMAL}, #{quantityBeginAdvise,jdbcType=DECIMAL}, #{stockUpDays,jdbcType=INTEGER},
#{stockUpSales,jdbcType=DECIMAL}, #{quantityBeginAdvise,jdbcType=DECIMAL}, #{stockUpDays,jdbcType=INTEGER},
#{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},
#{historyThirtydaySalesEbay,jdbcType=DECIMAL})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.bailuntec.domain.entity.DcAutoTurnover"
>
<insert
id=
"insertSelective"
parameterType=
"com.bailuntec.domain.entity.DcAutoTurnover"
>
<!--
<!--
...
@@ -447,6 +453,15 @@
...
@@ -447,6 +453,15 @@
<if
test=
"suppliersName != null"
>
<if
test=
"suppliersName != null"
>
suppliers_name,
suppliers_name,
</if>
</if>
<if
test=
"historySevendaySalesEbay != null"
>
history_sevenday_sales_ebay,
</if>
<if
test=
"historyFourteendaySalesEbay != null"
>
history_fourteenday_sales_ebay,
</if>
<if
test=
"historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -629,6 +644,15 @@
...
@@ -629,6 +644,15 @@
<if
test=
"suppliersName != null"
>
<if
test=
"suppliersName != null"
>
#{suppliersName,jdbcType=VARCHAR},
#{suppliersName,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"historySevendaySalesEbay != null"
>
#{historySevendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"historyFourteendaySalesEbay != null"
>
#{historyFourteendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"historyThirtydaySalesEbay != null"
>
#{historyThirtydaySalesEbay,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"
>
...
@@ -828,6 +852,15 @@
...
@@ -828,6 +852,15 @@
<if
test=
"record.suppliersName != null"
>
<if
test=
"record.suppliersName != null"
>
suppliers_name = #{record.suppliersName,jdbcType=VARCHAR},
suppliers_name = #{record.suppliersName,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.historySevendaySalesEbay != null"
>
history_sevenday_sales_ebay = #{record.historySevendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"record.historyFourteendaySalesEbay != null"
>
history_fourteenday_sales_ebay = #{record.historyFourteendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"record.historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,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"
/>
...
@@ -898,7 +931,10 @@
...
@@ -898,7 +931,10 @@
product_inner_code = #{record.productInnerCode,jdbcType=VARCHAR},
product_inner_code = #{record.productInnerCode,jdbcType=VARCHAR},
bailun_category_id = #{record.bailunCategoryId,jdbcType=INTEGER},
bailun_category_id = #{record.bailunCategoryId,jdbcType=INTEGER},
buyer_name = #{record.buyerName,jdbcType=VARCHAR},
buyer_name = #{record.buyerName,jdbcType=VARCHAR},
suppliers_name = #{record.suppliersName,jdbcType=VARCHAR}
suppliers_name = #{record.suppliersName,jdbcType=VARCHAR},
history_sevenday_sales_ebay = #{record.historySevendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{record.historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{record.historyThirtydaySalesEbay,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>
...
@@ -1087,6 +1123,15 @@
...
@@ -1087,6 +1123,15 @@
<if
test=
"suppliersName != null"
>
<if
test=
"suppliersName != null"
>
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"historySevendaySalesEbay != null"
>
history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"historyFourteendaySalesEbay != null"
>
history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,jdbcType=DECIMAL},
</if>
</set>
</set>
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
...
@@ -1154,7 +1199,10 @@
...
@@ -1154,7 +1199,10 @@
product_inner_code = #{productInnerCode,jdbcType=VARCHAR},
product_inner_code = #{productInnerCode,jdbcType=VARCHAR},
bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
buyer_name = #{buyerName,jdbcType=VARCHAR},
buyer_name = #{buyerName,jdbcType=VARCHAR},
suppliers_name = #{suppliersName,jdbcType=VARCHAR}
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,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"
>
...
@@ -1345,6 +1393,15 @@
...
@@ -1345,6 +1393,15 @@
<if
test=
"suppliersName != null"
>
<if
test=
"suppliersName != null"
>
suppliers_name,
suppliers_name,
</if>
</if>
<if
test=
"historySevendaySalesEbay != null"
>
history_sevenday_sales_ebay,
</if>
<if
test=
"historyFourteendaySalesEbay != null"
>
history_fourteenday_sales_ebay,
</if>
<if
test=
"historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay,
</if>
</trim>
</trim>
values
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
@@ -1528,6 +1585,15 @@
...
@@ -1528,6 +1585,15 @@
<if
test=
"suppliersName != null"
>
<if
test=
"suppliersName != null"
>
#{suppliersName,jdbcType=VARCHAR},
#{suppliersName,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"historySevendaySalesEbay != null"
>
#{historySevendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"historyFourteendaySalesEbay != null"
>
#{historyFourteendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"historyThirtydaySalesEbay != null"
>
#{historyThirtydaySalesEbay,jdbcType=DECIMAL},
</if>
</trim>
</trim>
on duplicate key update
on duplicate key update
<trim
suffixOverrides=
","
>
<trim
suffixOverrides=
","
>
...
@@ -1711,6 +1777,15 @@
...
@@ -1711,6 +1777,15 @@
<if
test=
"suppliersName != null"
>
<if
test=
"suppliersName != null"
>
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"historySevendaySalesEbay != null"
>
history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"historyFourteendaySalesEbay != null"
>
history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
</if>
<if
test=
"historyThirtydaySalesEbay != null"
>
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,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"
>
...
@@ -1733,7 +1808,8 @@
...
@@ -1733,7 +1808,8 @@
history_sevenday_sales, history_fourteenday_sales, history_thirtyday_sales, sales_explain_details,
history_sevenday_sales, history_fourteenday_sales, history_thirtyday_sales, sales_explain_details,
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)
buyer_name, suppliers_name, history_sevenday_sales_ebay, history_fourteenday_sales_ebay,
history_thirtyday_sales_ebay)
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},
...
@@ -1757,8 +1833,9 @@
...
@@ -1757,8 +1833,9 @@
#{salesExplainDetails,jdbcType=VARCHAR}, #{forecastTurnoverdaySales,jdbcType=DECIMAL},
#{salesExplainDetails,jdbcType=VARCHAR}, #{forecastTurnoverdaySales,jdbcType=DECIMAL},
#{stockUpSales,jdbcType=DECIMAL}, #{quantityBeginAdvise,jdbcType=DECIMAL}, #{stockUpDays,jdbcType=INTEGER},
#{stockUpSales,jdbcType=DECIMAL}, #{quantityBeginAdvise,jdbcType=DECIMAL}, #{stockUpDays,jdbcType=INTEGER},
#{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},
#{historyThirtydaySalesEbay,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},
...
@@ -1819,7 +1896,10 @@
...
@@ -1819,7 +1896,10 @@
product_inner_code = #{productInnerCode,jdbcType=VARCHAR},
product_inner_code = #{productInnerCode,jdbcType=VARCHAR},
bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
buyer_name = #{buyerName,jdbcType=VARCHAR},
buyer_name = #{buyerName,jdbcType=VARCHAR},
suppliers_name = #{suppliersName,jdbcType=VARCHAR}
suppliers_name = #{suppliersName,jdbcType=VARCHAR},
history_sevenday_sales_ebay = #{historySevendaySalesEbay,jdbcType=DECIMAL},
history_fourteenday_sales_ebay = #{historyFourteendaySalesEbay,jdbcType=DECIMAL},
history_thirtyday_sales_ebay = #{historyThirtydaySalesEbay,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"
>
<!--
<!--
...
...
data-show/show-auto-turnover/src/test/java/AutoTurnoverTest.java
View file @
4d0370a6
...
@@ -51,7 +51,7 @@ public class AutoTurnoverTest {
...
@@ -51,7 +51,7 @@ public class AutoTurnoverTest {
DcBaseStockMapper
mapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
);
DcBaseStockMapper
mapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
);
// dcBaseStock = mapper.selectOneByExample(DcBaseStockExample.newAndCreateCriteria().andBailunSkuEqualTo("322572421").andWarehouseCodeEqualTo("QYBLZZ").example());
// dcBaseStock = mapper.selectOneByExample(DcBaseStockExample.newAndCreateCriteria().andBailunSkuEqualTo("322572421").andWarehouseCodeEqualTo("QYBLZZ").example());
// dcBaseStock = mapper.selectOneByExample(DcBaseStockExample.newAndCreateCriteria().andBailunSkuEqualTo("232232601").andWarehouseCodeEqualTo("CHUKFBA").example());
// dcBaseStock = mapper.selectOneByExample(DcBaseStockExample.newAndCreateCriteria().andBailunSkuEqualTo("232232601").andWarehouseCodeEqualTo("CHUKFBA").example());
dcBaseStock
=
mapper
.
selectOneByExample
(
DcBaseStockExample
.
newAndCreateCriteria
().
andBailunSkuEqualTo
(
"2
272904
01"
).
andWarehouseCodeEqualTo
(
"GZBLWH"
).
example
());
dcBaseStock
=
mapper
.
selectOneByExample
(
DcBaseStockExample
.
newAndCreateCriteria
().
andBailunSkuEqualTo
(
"2
049127
01"
).
andWarehouseCodeEqualTo
(
"GZBLWH"
).
example
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
}
finally
{
...
...
mybatis-generator/src/main/resources/init.properties
View file @
4d0370a6
table-name
=
dc_
base_stock
table-name
=
dc_
auto_turnover
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