Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
5d2e2de9
Commit
5d2e2de9
authored
Aug 02, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单表加上佣金相关字段
parent
b96beb9e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1081 additions
and
28 deletions
+1081
-28
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/DistributionOrder.java
...com/wwdz/ch/db/domain/distribution/DistributionOrder.java
+58
-3
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/DistributionOrderExample.java
...z/ch/db/domain/distribution/DistributionOrderExample.java
+793
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/DistributionOrderRequestDto.java
...dto/request/distribution/DistributionOrderRequestDto.java
+31
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/DistributionOrderMapper.xml
...wdz/ch/db/mapper/distribution/DistributionOrderMapper.xml
+106
-9
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
...ch/wx/impl/distribution/DistributionOrderServiceImpl.java
+24
-11
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
...h/wx/impl/distribution/SpecialPerformanceServiceImpl.java
+26
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/UserAccountDetailServiceImpl.java
...ch/wx/impl/distribution/UserAccountDetailServiceImpl.java
+25
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
.../java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
+8
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/SpecialPerformanceService.java
...ch/wx/service/distribution/SpecialPerformanceService.java
+7
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/GroupPurchaseController.java
.../wwdz/ch/wx/web/distribution/GroupPurchaseController.java
+2
-2
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/DistributionOrder.java
View file @
5d2e2de9
package
com.wwdz.ch.db.domain.distribution
;
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -10,7 +11,7 @@ import lombok.Data;
...
@@ -10,7 +11,7 @@ import lombok.Data;
/**
/**
* @author shiyu
* @author shiyu
* @date 2024/0
6/17
* @date 2024/0
8/02
*/
*/
@Data
@Data
public
class
DistributionOrder
implements
Entity
{
public
class
DistributionOrder
implements
Entity
{
...
@@ -146,6 +147,36 @@ public class DistributionOrder implements Entity {
...
@@ -146,6 +147,36 @@ public class DistributionOrder implements Entity {
*/
*/
private
Integer
type
;
private
Integer
type
;
/**
* 供货价
*/
private
Long
supplyPrice
;
/**
* 介绍佣金金额
*/
private
Long
introduceAmount
;
/**
* 介绍佣金比例
*/
private
BigDecimal
introduceRebate
;
/**
* 介绍人id
*/
private
Long
introducerId
;
/**
* 平台佣金金额
*/
private
Long
channelAmount
;
/**
* 平台佣金比例
*/
private
BigDecimal
channelRebate
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
@Override
...
@@ -181,6 +212,12 @@ public class DistributionOrder implements Entity {
...
@@ -181,6 +212,12 @@ public class DistributionOrder implements Entity {
sb
.
append
(
", state="
).
append
(
state
);
sb
.
append
(
", state="
).
append
(
state
);
sb
.
append
(
", logisticsState="
).
append
(
logisticsState
);
sb
.
append
(
", logisticsState="
).
append
(
logisticsState
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", supplyPrice="
).
append
(
supplyPrice
);
sb
.
append
(
", introduceAmount="
).
append
(
introduceAmount
);
sb
.
append
(
", introduceRebate="
).
append
(
introduceRebate
);
sb
.
append
(
", introducerId="
).
append
(
introducerId
);
sb
.
append
(
", channelAmount="
).
append
(
channelAmount
);
sb
.
append
(
", channelRebate="
).
append
(
channelRebate
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
...
@@ -224,7 +261,13 @@ public class DistributionOrder implements Entity {
...
@@ -224,7 +261,13 @@ public class DistributionOrder implements Entity {
&&
(
this
.
getShareRecordId
()
==
null
?
other
.
getShareRecordId
()
==
null
:
this
.
getShareRecordId
().
equals
(
other
.
getShareRecordId
()))
&&
(
this
.
getShareRecordId
()
==
null
?
other
.
getShareRecordId
()
==
null
:
this
.
getShareRecordId
().
equals
(
other
.
getShareRecordId
()))
&&
(
this
.
getState
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
&&
(
this
.
getState
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
&&
(
this
.
getLogisticsState
()
==
null
?
other
.
getLogisticsState
()
==
null
:
this
.
getLogisticsState
().
equals
(
other
.
getLogisticsState
()))
&&
(
this
.
getLogisticsState
()
==
null
?
other
.
getLogisticsState
()
==
null
:
this
.
getLogisticsState
().
equals
(
other
.
getLogisticsState
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()));
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()))
&&
(
this
.
getSupplyPrice
()
==
null
?
other
.
getSupplyPrice
()
==
null
:
this
.
getSupplyPrice
().
equals
(
other
.
getSupplyPrice
()))
&&
(
this
.
getIntroduceAmount
()
==
null
?
other
.
getIntroduceAmount
()
==
null
:
this
.
getIntroduceAmount
().
equals
(
other
.
getIntroduceAmount
()))
&&
(
this
.
getIntroduceRebate
()
==
null
?
other
.
getIntroduceRebate
()
==
null
:
this
.
getIntroduceRebate
().
equals
(
other
.
getIntroduceRebate
()))
&&
(
this
.
getIntroducerId
()
==
null
?
other
.
getIntroducerId
()
==
null
:
this
.
getIntroducerId
().
equals
(
other
.
getIntroducerId
()))
&&
(
this
.
getChannelAmount
()
==
null
?
other
.
getChannelAmount
()
==
null
:
this
.
getChannelAmount
().
equals
(
other
.
getChannelAmount
()))
&&
(
this
.
getChannelRebate
()
==
null
?
other
.
getChannelRebate
()
==
null
:
this
.
getChannelRebate
().
equals
(
other
.
getChannelRebate
()));
}
}
@Override
@Override
...
@@ -258,6 +301,12 @@ public class DistributionOrder implements Entity {
...
@@ -258,6 +301,12 @@ public class DistributionOrder implements Entity {
result
=
prime
*
result
+
((
getState
()
==
null
)
?
0
:
getState
().
hashCode
());
result
=
prime
*
result
+
((
getState
()
==
null
)
?
0
:
getState
().
hashCode
());
result
=
prime
*
result
+
((
getLogisticsState
()
==
null
)
?
0
:
getLogisticsState
().
hashCode
());
result
=
prime
*
result
+
((
getLogisticsState
()
==
null
)
?
0
:
getLogisticsState
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getSupplyPrice
()
==
null
)
?
0
:
getSupplyPrice
().
hashCode
());
result
=
prime
*
result
+
((
getIntroduceAmount
()
==
null
)
?
0
:
getIntroduceAmount
().
hashCode
());
result
=
prime
*
result
+
((
getIntroduceRebate
()
==
null
)
?
0
:
getIntroduceRebate
().
hashCode
());
result
=
prime
*
result
+
((
getIntroducerId
()
==
null
)
?
0
:
getIntroducerId
().
hashCode
());
result
=
prime
*
result
+
((
getChannelAmount
()
==
null
)
?
0
:
getChannelAmount
().
hashCode
());
result
=
prime
*
result
+
((
getChannelRebate
()
==
null
)
?
0
:
getChannelRebate
().
hashCode
());
return
result
;
return
result
;
}
}
...
@@ -295,7 +344,13 @@ public class DistributionOrder implements Entity {
...
@@ -295,7 +344,13 @@ public class DistributionOrder implements Entity {
shareRecordId
(
"share_record_id"
,
"shareRecordId"
,
"VARCHAR"
,
false
),
shareRecordId
(
"share_record_id"
,
"shareRecordId"
,
"VARCHAR"
,
false
),
state
(
"state"
,
"state"
,
"INTEGER"
,
true
),
state
(
"state"
,
"state"
,
"INTEGER"
,
true
),
logisticsState
(
"logistics_state"
,
"logisticsState"
,
"INTEGER"
,
false
),
logisticsState
(
"logistics_state"
,
"logisticsState"
,
"INTEGER"
,
false
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
);
type
(
"type"
,
"type"
,
"INTEGER"
,
true
),
supplyPrice
(
"supply_price"
,
"supplyPrice"
,
"BIGINT"
,
false
),
introduceAmount
(
"introduce_amount"
,
"introduceAmount"
,
"BIGINT"
,
false
),
introduceRebate
(
"introduce_rebate"
,
"introduceRebate"
,
"DECIMAL"
,
false
),
introducerId
(
"introducer_id"
,
"introducerId"
,
"BIGINT"
,
false
),
channelAmount
(
"channel_amount"
,
"channelAmount"
,
"BIGINT"
,
false
),
channelRebate
(
"channel_rebate"
,
"channelRebate"
,
"DECIMAL"
,
false
);
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/DistributionOrderExample.java
View file @
5d2e2de9
package
com.wwdz.ch.db.domain.distribution
;
package
com.wwdz.ch.db.domain.distribution
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -3811,6 +3812,798 @@ public class DistributionOrderExample {
...
@@ -3811,6 +3812,798 @@ public class DistributionOrderExample {
addCriterion
(
"`type` not between"
,
value1
,
value2
,
"type"
);
addCriterion
(
"`type` not between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andSupplyPriceIsNull
()
{
addCriterion
(
"supply_price is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceIsNotNull
()
{
addCriterion
(
"supply_price is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceEqualTo
(
Long
value
)
{
addCriterion
(
"supply_price ="
,
value
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSupplyPriceEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"supply_price = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceNotEqualTo
(
Long
value
)
{
addCriterion
(
"supply_price <>"
,
value
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSupplyPriceNotEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"supply_price <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceGreaterThan
(
Long
value
)
{
addCriterion
(
"supply_price >"
,
value
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSupplyPriceGreaterThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"supply_price > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"supply_price >="
,
value
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSupplyPriceGreaterThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"supply_price >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceLessThan
(
Long
value
)
{
addCriterion
(
"supply_price <"
,
value
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSupplyPriceLessThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"supply_price < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"supply_price <="
,
value
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSupplyPriceLessThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"supply_price <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceIn
(
List
<
Long
>
values
)
{
addCriterion
(
"supply_price in"
,
values
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"supply_price not in"
,
values
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"supply_price between"
,
value1
,
value2
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSupplyPriceNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"supply_price not between"
,
value1
,
value2
,
"supplyPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountIsNull
()
{
addCriterion
(
"introduce_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountIsNotNull
()
{
addCriterion
(
"introduce_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_amount ="
,
value
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceAmountEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_amount <>"
,
value
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceAmountNotEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"introduce_amount >"
,
value
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceAmountGreaterThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_amount >="
,
value
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceAmountGreaterThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountLessThan
(
Long
value
)
{
addCriterion
(
"introduce_amount <"
,
value
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceAmountLessThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_amount <="
,
value
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceAmountLessThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"introduce_amount in"
,
values
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"introduce_amount not in"
,
values
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"introduce_amount between"
,
value1
,
value2
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"introduce_amount not between"
,
value1
,
value2
,
"introduceAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateIsNull
()
{
addCriterion
(
"introduce_rebate is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateIsNotNull
()
{
addCriterion
(
"introduce_rebate is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"introduce_rebate ="
,
value
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceRebateEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_rebate = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"introduce_rebate <>"
,
value
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceRebateNotEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_rebate <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"introduce_rebate >"
,
value
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceRebateGreaterThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_rebate > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"introduce_rebate >="
,
value
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceRebateGreaterThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_rebate >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateLessThan
(
BigDecimal
value
)
{
addCriterion
(
"introduce_rebate <"
,
value
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceRebateLessThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_rebate < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"introduce_rebate <="
,
value
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceRebateLessThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_rebate <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"introduce_rebate in"
,
values
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"introduce_rebate not in"
,
values
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"introduce_rebate between"
,
value1
,
value2
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceRebateNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"introduce_rebate not between"
,
value1
,
value2
,
"introduceRebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdIsNull
()
{
addCriterion
(
"introducer_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdIsNotNull
()
{
addCriterion
(
"introducer_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdEqualTo
(
Long
value
)
{
addCriterion
(
"introducer_id ="
,
value
,
"introducerId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroducerIdEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introducer_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"introducer_id <>"
,
value
,
"introducerId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroducerIdNotEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introducer_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdGreaterThan
(
Long
value
)
{
addCriterion
(
"introducer_id >"
,
value
,
"introducerId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroducerIdGreaterThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introducer_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"introducer_id >="
,
value
,
"introducerId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroducerIdGreaterThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introducer_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdLessThan
(
Long
value
)
{
addCriterion
(
"introducer_id <"
,
value
,
"introducerId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroducerIdLessThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introducer_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"introducer_id <="
,
value
,
"introducerId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroducerIdLessThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introducer_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"introducer_id in"
,
values
,
"introducerId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"introducer_id not in"
,
values
,
"introducerId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"introducer_id between"
,
value1
,
value2
,
"introducerId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroducerIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"introducer_id not between"
,
value1
,
value2
,
"introducerId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountIsNull
()
{
addCriterion
(
"channel_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountIsNotNull
()
{
addCriterion
(
"channel_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountEqualTo
(
Long
value
)
{
addCriterion
(
"channel_amount ="
,
value
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelAmountEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"channel_amount <>"
,
value
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelAmountNotEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"channel_amount >"
,
value
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelAmountGreaterThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"channel_amount >="
,
value
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelAmountGreaterThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountLessThan
(
Long
value
)
{
addCriterion
(
"channel_amount <"
,
value
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelAmountLessThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"channel_amount <="
,
value
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelAmountLessThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"channel_amount in"
,
values
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"channel_amount not in"
,
values
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"channel_amount between"
,
value1
,
value2
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"channel_amount not between"
,
value1
,
value2
,
"channelAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateIsNull
()
{
addCriterion
(
"channel_rebate is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateIsNotNull
()
{
addCriterion
(
"channel_rebate is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"channel_rebate ="
,
value
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelRebateEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_rebate = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"channel_rebate <>"
,
value
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelRebateNotEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_rebate <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"channel_rebate >"
,
value
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelRebateGreaterThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_rebate > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"channel_rebate >="
,
value
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelRebateGreaterThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_rebate >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateLessThan
(
BigDecimal
value
)
{
addCriterion
(
"channel_rebate <"
,
value
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelRebateLessThanColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_rebate < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"channel_rebate <="
,
value
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distribution_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andChannelRebateLessThanOrEqualToColumn
(
DistributionOrder
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"channel_rebate <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"channel_rebate in"
,
values
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"channel_rebate not in"
,
values
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"channel_rebate between"
,
value1
,
value2
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelRebateNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"channel_rebate not between"
,
value1
,
value2
,
"channelRebate"
);
return
(
Criteria
)
this
;
}
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/DistributionOrderRequestDto.java
View file @
5d2e2de9
...
@@ -4,6 +4,7 @@ import com.wwdz.ch.db.dto.request.BaseRequestDto;
...
@@ -4,6 +4,7 @@ import com.wwdz.ch.db.dto.request.BaseRequestDto;
import
com.xxdxxs.entity.Entity
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -149,6 +150,36 @@ public class DistributionOrderRequestDto extends BaseRequestDto implements Entit
...
@@ -149,6 +150,36 @@ public class DistributionOrderRequestDto extends BaseRequestDto implements Entit
*/
*/
private
String
refundPrice
;
private
String
refundPrice
;
/**
* 供货价
*/
private
Long
supplyPrice
;
/**
* 介绍佣金金额
*/
private
Long
introduceAmount
;
/**
* 介绍佣金比例
*/
private
BigDecimal
introduceRebate
;
/**
* 介绍人id
*/
private
Long
introducerId
;
/**
* 平台佣金金额
*/
private
Long
channelAmount
;
/**
* 平台佣金比例
*/
private
BigDecimal
channelRebate
;
/**
/**
* 退款接口请求秘钥
* 退款接口请求秘钥
*/
*/
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/DistributionOrderMapper.xml
View file @
5d2e2de9
...
@@ -29,6 +29,12 @@
...
@@ -29,6 +29,12 @@
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
<result
column=
"logistics_state"
jdbcType=
"INTEGER"
property=
"logisticsState"
/>
<result
column=
"logistics_state"
jdbcType=
"INTEGER"
property=
"logisticsState"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"supply_price"
jdbcType=
"BIGINT"
property=
"supplyPrice"
/>
<result
column=
"introduce_amount"
jdbcType=
"BIGINT"
property=
"introduceAmount"
/>
<result
column=
"introduce_rebate"
jdbcType=
"DECIMAL"
property=
"introduceRebate"
/>
<result
column=
"introducer_id"
jdbcType=
"BIGINT"
property=
"introducerId"
/>
<result
column=
"channel_amount"
jdbcType=
"BIGINT"
property=
"channelAmount"
/>
<result
column=
"channel_rebate"
jdbcType=
"DECIMAL"
property=
"channelRebate"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<where>
<where>
...
@@ -93,7 +99,8 @@
...
@@ -93,7 +99,8 @@
buyer_openid, shop_id, seller_id, amount, address_id, receiver_name, receiver_phone,
buyer_openid, shop_id, seller_id, amount, address_id, receiver_name, receiver_phone,
receiver_address, logistics_code, waybill, create_time, pay_time, delivery_time,
receiver_address, logistics_code, waybill, create_time, pay_time, delivery_time,
signed_time, finish_time, update_time, share_record_id, `state`, logistics_state,
signed_time, finish_time, update_time, share_record_id, `state`, logistics_state,
`type`
`type`, supply_price, introduce_amount, introduce_rebate, introducer_id, channel_amount,
channel_rebate
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributionOrderExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributionOrderExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -132,7 +139,8 @@
...
@@ -132,7 +139,8 @@
buyer_openid, shop_id, seller_id, amount, address_id, receiver_name, receiver_phone,
buyer_openid, shop_id, seller_id, amount, address_id, receiver_name, receiver_phone,
receiver_address, logistics_code, waybill, create_time, pay_time, delivery_time,
receiver_address, logistics_code, waybill, create_time, pay_time, delivery_time,
signed_time, finish_time, update_time, share_record_id, `state`, logistics_state,
signed_time, finish_time, update_time, share_record_id, `state`, logistics_state,
`type`
`type`, supply_price, introduce_amount, introduce_rebate, introducer_id, channel_amount,
channel_rebate
</otherwise>
</otherwise>
</choose>
</choose>
from distribution_order
from distribution_order
...
@@ -167,7 +175,8 @@
...
@@ -167,7 +175,8 @@
buyer_openid, shop_id, seller_id, amount, address_id, receiver_name, receiver_phone,
buyer_openid, shop_id, seller_id, amount, address_id, receiver_name, receiver_phone,
receiver_address, logistics_code, waybill, create_time, pay_time, delivery_time,
receiver_address, logistics_code, waybill, create_time, pay_time, delivery_time,
signed_time, finish_time, update_time, share_record_id, `state`, logistics_state,
signed_time, finish_time, update_time, share_record_id, `state`, logistics_state,
`type`
`type`, supply_price, introduce_amount, introduce_rebate, introducer_id, channel_amount,
channel_rebate
</otherwise>
</otherwise>
</choose>
</choose>
from distribution_order
from distribution_order
...
@@ -195,7 +204,9 @@
...
@@ -195,7 +204,9 @@
waybill, create_time, pay_time,
waybill, create_time, pay_time,
delivery_time, signed_time, finish_time,
delivery_time, signed_time, finish_time,
update_time, share_record_id, `state`,
update_time, share_record_id, `state`,
logistics_state, `type`)
logistics_state, `type`, supply_price,
introduce_amount, introduce_rebate, introducer_id,
channel_amount, channel_rebate)
values (#{distributionOrderId,jdbcType=VARCHAR}, #{prepayId,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR},
values (#{distributionOrderId,jdbcType=VARCHAR}, #{prepayId,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR},
#{itemId,jdbcType=BIGINT}, #{itemNum,jdbcType=INTEGER}, #{buyerId,jdbcType=BIGINT},
#{itemId,jdbcType=BIGINT}, #{itemNum,jdbcType=INTEGER}, #{buyerId,jdbcType=BIGINT},
#{buyerOpenid,jdbcType=VARCHAR}, #{shopId,jdbcType=BIGINT}, #{sellerId,jdbcType=BIGINT},
#{buyerOpenid,jdbcType=VARCHAR}, #{shopId,jdbcType=BIGINT}, #{sellerId,jdbcType=BIGINT},
...
@@ -204,7 +215,9 @@
...
@@ -204,7 +215,9 @@
#{waybill,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP},
#{waybill,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP},
#{deliveryTime,jdbcType=TIMESTAMP}, #{signedTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP},
#{deliveryTime,jdbcType=TIMESTAMP}, #{signedTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{shareRecordId,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER},
#{updateTime,jdbcType=TIMESTAMP}, #{shareRecordId,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER},
#{logisticsState,jdbcType=INTEGER}, #{type,jdbcType=INTEGER})
#{logisticsState,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{supplyPrice,jdbcType=BIGINT},
#{introduceAmount,jdbcType=BIGINT}, #{introduceRebate,jdbcType=DECIMAL}, #{introducerId,jdbcType=BIGINT},
#{channelAmount,jdbcType=BIGINT}, #{channelRebate,jdbcType=DECIMAL})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributionOrder"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributionOrder"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
...
@@ -290,6 +303,24 @@
...
@@ -290,6 +303,24 @@
<if
test=
"type != null"
>
<if
test=
"type != null"
>
`type`,
`type`,
</if>
</if>
<if
test=
"supplyPrice != null"
>
supply_price,
</if>
<if
test=
"introduceAmount != null"
>
introduce_amount,
</if>
<if
test=
"introduceRebate != null"
>
introduce_rebate,
</if>
<if
test=
"introducerId != null"
>
introducer_id,
</if>
<if
test=
"channelAmount != null"
>
channel_amount,
</if>
<if
test=
"channelRebate != null"
>
channel_rebate,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"distributionOrderId != null"
>
<if
test=
"distributionOrderId != null"
>
...
@@ -370,6 +401,24 @@
...
@@ -370,6 +401,24 @@
<if
test=
"type != null"
>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
#{type,jdbcType=INTEGER},
</if>
</if>
<if
test=
"supplyPrice != null"
>
#{supplyPrice,jdbcType=BIGINT},
</if>
<if
test=
"introduceAmount != null"
>
#{introduceAmount,jdbcType=BIGINT},
</if>
<if
test=
"introduceRebate != null"
>
#{introduceRebate,jdbcType=DECIMAL},
</if>
<if
test=
"introducerId != null"
>
#{introducerId,jdbcType=BIGINT},
</if>
<if
test=
"channelAmount != null"
>
#{channelAmount,jdbcType=BIGINT},
</if>
<if
test=
"channelRebate != null"
>
#{channelRebate,jdbcType=DECIMAL},
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributionOrderExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributionOrderExample"
resultType=
"java.lang.Long"
>
...
@@ -462,6 +511,24 @@
...
@@ -462,6 +511,24 @@
<if
test=
"record.type != null"
>
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
</if>
</if>
<if
test=
"record.supplyPrice != null"
>
supply_price = #{record.supplyPrice,jdbcType=BIGINT},
</if>
<if
test=
"record.introduceAmount != null"
>
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.introduceRebate != null"
>
introduce_rebate = #{record.introduceRebate,jdbcType=DECIMAL},
</if>
<if
test=
"record.introducerId != null"
>
introducer_id = #{record.introducerId,jdbcType=BIGINT},
</if>
<if
test=
"record.channelAmount != null"
>
channel_amount = #{record.channelAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.channelRebate != null"
>
channel_rebate = #{record.channelRebate,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"
/>
...
@@ -495,7 +562,13 @@
...
@@ -495,7 +562,13 @@
share_record_id = #{record.shareRecordId,jdbcType=VARCHAR},
share_record_id = #{record.shareRecordId,jdbcType=VARCHAR},
`state` = #{record.state,jdbcType=INTEGER},
`state` = #{record.state,jdbcType=INTEGER},
logistics_state = #{record.logisticsState,jdbcType=INTEGER},
logistics_state = #{record.logisticsState,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER}
`type` = #{record.type,jdbcType=INTEGER},
supply_price = #{record.supplyPrice,jdbcType=BIGINT},
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
introduce_rebate = #{record.introduceRebate,jdbcType=DECIMAL},
introducer_id = #{record.introducerId,jdbcType=BIGINT},
channel_amount = #{record.channelAmount,jdbcType=BIGINT},
channel_rebate = #{record.channelRebate,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>
...
@@ -581,6 +654,24 @@
...
@@ -581,6 +654,24 @@
<if
test=
"type != null"
>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
</if>
</if>
<if
test=
"supplyPrice != null"
>
supply_price = #{supplyPrice,jdbcType=BIGINT},
</if>
<if
test=
"introduceAmount != null"
>
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
</if>
<if
test=
"introduceRebate != null"
>
introduce_rebate = #{introduceRebate,jdbcType=DECIMAL},
</if>
<if
test=
"introducerId != null"
>
introducer_id = #{introducerId,jdbcType=BIGINT},
</if>
<if
test=
"channelAmount != null"
>
channel_amount = #{channelAmount,jdbcType=BIGINT},
</if>
<if
test=
"channelRebate != null"
>
channel_rebate = #{channelRebate,jdbcType=DECIMAL},
</if>
</set>
</set>
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
...
@@ -611,7 +702,13 @@
...
@@ -611,7 +702,13 @@
share_record_id = #{shareRecordId,jdbcType=VARCHAR},
share_record_id = #{shareRecordId,jdbcType=VARCHAR},
`state` = #{state,jdbcType=INTEGER},
`state` = #{state,jdbcType=INTEGER},
logistics_state = #{logisticsState,jdbcType=INTEGER},
logistics_state = #{logisticsState,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER}
`type` = #{type,jdbcType=INTEGER},
supply_price = #{supplyPrice,jdbcType=BIGINT},
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
introduce_rebate = #{introduceRebate,jdbcType=DECIMAL},
introducer_id = #{introducerId,jdbcType=BIGINT},
channel_amount = #{channelAmount,jdbcType=BIGINT},
channel_rebate = #{channelRebate,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributionOrderExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributionOrderExample"
resultMap=
"BaseResultMap"
>
...
@@ -651,7 +748,8 @@
...
@@ -651,7 +748,8 @@
buyer_openid, shop_id, seller_id, amount, address_id, receiver_name, receiver_phone,
buyer_openid, shop_id, seller_id, amount, address_id, receiver_name, receiver_phone,
receiver_address, logistics_code, waybill, create_time, pay_time, delivery_time,
receiver_address, logistics_code, waybill, create_time, pay_time, delivery_time,
signed_time, finish_time, update_time, share_record_id, `state`, logistics_state,
signed_time, finish_time, update_time, share_record_id, `state`, logistics_state,
`type`
`type`, supply_price, introduce_amount, introduce_rebate, introducer_id, channel_amount,
channel_rebate
</otherwise>
</otherwise>
</choose>
</choose>
from distribution_order
from distribution_order
...
@@ -663,7 +761,6 @@
...
@@ -663,7 +761,6 @@
</if>
</if>
limit 1
limit 1
</select>
</select>
<select
id=
"countGroupByStateForDistributor"
parameterType=
"java.lang.Long"
resultType=
"com.wwdz.ch.db.bean.DistributionOrderNum"
>
<select
id=
"countGroupByStateForDistributor"
parameterType=
"java.lang.Long"
resultType=
"com.wwdz.ch.db.bean.DistributionOrderNum"
>
select state, count(distribution_order_id) as num from distribution_order where seller_id = #{sellerId} group by state
select state, count(distribution_order_id) as num from distribution_order where seller_id = #{sellerId} group by state
</select>
</select>
...
...
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
5d2e2de9
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.distribution"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.distribution"
targetProject=
"ch-dao/src/main/java"
/>
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
group_purchase_config
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
distribution_order
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
</table>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
5d2e2de9
...
@@ -271,7 +271,16 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -271,7 +271,16 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
//把介绍人作为该订单的分享链接字段的值
//把介绍人作为该订单的分享链接字段的值
introducerId
=
followFansRecord
.
getIntroducerId
();
introducerId
=
followFansRecord
.
getIntroducerId
();
}
}
//查询该用户和藏家的介绍人
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
followFansRecordRequestDto
.
setFollowerId
(
auctionConfig
.
getCreatorId
());
followFansRecordRequestDto
.
setFansId
(
auctionRecord
.
getUserId
());
double
rebate
=
distributorProfitService
.
getIntroduceRebate
(
followFansRecordRequestDto
);
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
distributionOrder
.
setIntroducerId
(
introducerId
);
distributionOrder
.
setIntroduceRebate
(
BigDecimal
.
valueOf
(
rebate
));
distributionOrder
.
setItemId
(
dto
.
getItemId
());
distributionOrder
.
setItemId
(
dto
.
getItemId
());
distributionOrder
.
setItemNum
(
1
);
distributionOrder
.
setItemNum
(
1
);
distributionOrder
.
setShareRecordId
(
String
.
valueOf
(
introducerId
));
distributionOrder
.
setShareRecordId
(
String
.
valueOf
(
introducerId
));
...
@@ -292,11 +301,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -292,11 +301,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
DistributorProfit
distributorProfit
=
new
DistributorProfit
();
DistributorProfit
distributorProfit
=
new
DistributorProfit
();
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
dto
.
getItemId
());
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
dto
.
getItemId
());
//查询该用户和藏家的介绍人
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
followFansRecordRequestDto
.
setFollowerId
(
auctionConfig
.
getCreatorId
());
followFansRecordRequestDto
.
setFansId
(
auctionRecord
.
getUserId
());
double
rebate
=
distributorProfitService
.
getIntroduceRebate
(
followFansRecordRequestDto
);
double
introduceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
rebate
;
double
introduceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
rebate
;
//实际订单到账金额
//实际订单到账金额
...
@@ -313,7 +318,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -313,7 +318,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
distributorProfit
.
setItemNum
(
distributionOrder
.
getItemNum
());
distributorProfit
.
setItemNum
(
distributionOrder
.
getItemNum
());
distributorProfit
.
setAmount
(
distributionOrder
.
getAmount
());
distributorProfit
.
setAmount
(
distributionOrder
.
getAmount
());
distributorProfit
.
setRealAmount
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
realAmount
)));
distributorProfit
.
setRealAmount
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
realAmount
)));
distributorProfit
.
setItemCost
(
auctionConfig
.
getStart
Price
());
distributorProfit
.
setItemCost
(
supplierItem
.
getSupply
Price
());
distributorProfit
.
setChannelCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
channelServiceCost
)));
distributorProfit
.
setChannelCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
channelServiceCost
)));
distributorProfit
.
setIntroduceCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
introduceCost
)));
distributorProfit
.
setIntroduceCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
introduceCost
)));
//拍卖订单,藏家的利润就是商品设置的供货价
//拍卖订单,藏家的利润就是商品设置的供货价
...
@@ -419,7 +424,12 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -419,7 +424,12 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
//把介绍人作为该订单的分享链接字段的值
//把介绍人作为该订单的分享链接字段的值
introducerId
=
followFansRecord
.
getIntroducerId
();
introducerId
=
followFansRecord
.
getIntroducerId
();
}
}
//介绍人分佣
double
rebate
=
distributorProfitService
.
getIntroduceRebate
(
followFansRecordRequestDto
);
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
distributionOrder
.
setIntroduceRebate
(
BigDecimal
.
valueOf
(
rebate
));
distributionOrder
.
setIntroducerId
(
introducerId
);
distributionOrder
.
setItemId
(
itemId
);
distributionOrder
.
setItemId
(
itemId
);
distributionOrder
.
setItemNum
(
dto
.
getItemNum
());
distributionOrder
.
setItemNum
(
dto
.
getItemNum
());
distributionOrder
.
setShareRecordId
(
String
.
valueOf
(
introducerId
));
distributionOrder
.
setShareRecordId
(
String
.
valueOf
(
introducerId
));
...
@@ -461,8 +471,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -461,8 +471,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
//暂时先不考虑
//暂时先不考虑
double
channelServiceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
channelCostRebate
;
double
channelServiceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
channelCostRebate
;
//介绍人分佣,自己推荐获得的订单无需计算介绍佣金
double
rebate
=
distributorProfitService
.
getIntroduceRebate
(
followFansRecordRequestDto
);
double
introduceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
rebate
;
double
introduceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
rebate
;
distributorProfit
.
setDistributionOrderId
(
distributionOrderId
);
distributorProfit
.
setDistributionOrderId
(
distributionOrderId
);
distributorProfit
.
setDistributorId
(
distributionOrder
.
getSellerId
());
distributorProfit
.
setDistributorId
(
distributionOrder
.
getSellerId
());
...
@@ -470,7 +479,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -470,7 +479,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
distributorProfit
.
setItemNum
(
distributionOrder
.
getItemNum
());
distributorProfit
.
setItemNum
(
distributionOrder
.
getItemNum
());
distributorProfit
.
setAmount
(
distributionOrder
.
getAmount
());
distributorProfit
.
setAmount
(
distributionOrder
.
getAmount
());
distributorProfit
.
setRealAmount
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
realAmount
)));
distributorProfit
.
setRealAmount
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
realAmount
)));
distributorProfit
.
setItemCost
(
null
);
distributorProfit
.
setItemCost
(
supplierItem
.
getSupplyPrice
()
);
distributorProfit
.
setChannelCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
channelServiceCost
)));
distributorProfit
.
setChannelCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
channelServiceCost
)));
distributorProfit
.
setIntroduceCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
introduceCost
)));
distributorProfit
.
setIntroduceCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
introduceCost
)));
long
profit
=
distributionOrder
.
getAmount
()
-
distributorProfit
.
getChannelCost
()
-
distributorProfit
.
getIntroduceCost
();
long
profit
=
distributionOrder
.
getAmount
()
-
distributorProfit
.
getChannelCost
()
-
distributorProfit
.
getIntroduceCost
();
...
@@ -519,6 +528,9 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -519,6 +528,9 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
//把介绍人作为该订单的分享链接字段的值
//把介绍人作为该订单的分享链接字段的值
introducerId
=
followFansRecord
.
getIntroducerId
();
introducerId
=
followFansRecord
.
getIntroducerId
();
}
}
//查询该用户和藏家的介绍人
double
rebate
=
distributorProfitService
.
getIntroduceRebate
(
followFansRecordRequestDto
);
String
distributionOrderId
=
IdUtils
.
getOrderNumber
(
DISTRIBUTION_ORDER_PREFIX
);
String
distributionOrderId
=
IdUtils
.
getOrderNumber
(
DISTRIBUTION_ORDER_PREFIX
);
DistributionOrderRequestDto
prePayDto
=
new
DistributionOrderRequestDto
();
DistributionOrderRequestDto
prePayDto
=
new
DistributionOrderRequestDto
();
prePayDto
.
setDistributionOrderId
(
distributionOrderId
);
prePayDto
.
setDistributionOrderId
(
distributionOrderId
);
...
@@ -535,6 +547,8 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -535,6 +547,8 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
map
.
put
(
"prepayId"
,
prepayId
);
map
.
put
(
"prepayId"
,
prepayId
);
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
distributionOrder
.
setIntroducerId
(
introducerId
);
distributionOrder
.
setIntroduceRebate
(
BigDecimal
.
valueOf
(
rebate
));
distributionOrder
.
setItemId
(
itemId
);
distributionOrder
.
setItemId
(
itemId
);
distributionOrder
.
setItemNum
(
dto
.
getItemNum
());
distributionOrder
.
setItemNum
(
dto
.
getItemNum
());
distributionOrder
.
setShareRecordId
(
String
.
valueOf
(
introducerId
));
distributionOrder
.
setShareRecordId
(
String
.
valueOf
(
introducerId
));
...
@@ -569,8 +583,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -569,8 +583,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
groupPurchaseRecordDao
.
insert
(
groupPurchaseRecord
);
groupPurchaseRecordDao
.
insert
(
groupPurchaseRecord
);
//计算利润
//计算利润
//查询该用户和藏家的介绍人
double
rebate
=
distributorProfitService
.
getIntroduceRebate
(
followFansRecordRequestDto
);
double
introduceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
rebate
;
double
introduceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
rebate
;
//实际订单到账金额
//实际订单到账金额
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
View file @
5d2e2de9
...
@@ -206,6 +206,8 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -206,6 +206,8 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
updateDto
.
setState
(
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
updateDto
.
setState
(
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
updateDto
.
setUpdateTime
(
now
);
updateDto
.
setUpdateTime
(
now
);
specialPerformanceDao
.
update
(
updateDto
);
specialPerformanceDao
.
update
(
updateDto
);
//删除专场商品
offShelvesItemOfSpecialPerformance
(
specialPerformance
.
getId
());
specialPerformance
.
setState
(
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
specialPerformance
.
setState
(
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
}
}
int
specialPerformanceId
=
specialPerformance
.
getId
();
int
specialPerformanceId
=
specialPerformance
.
getId
();
...
@@ -454,6 +456,8 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -454,6 +456,8 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
updateDto
.
setState
(
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
updateDto
.
setState
(
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
updateDto
.
setUpdateTime
(
now
);
updateDto
.
setUpdateTime
(
now
);
specialPerformanceDao
.
update
(
updateDto
);
specialPerformanceDao
.
update
(
updateDto
);
//删除专场商品
offShelvesItemOfSpecialPerformance
(
dto
.
getSpecialPerformanceId
());
resultMap
.
put
(
"state"
,
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
resultMap
.
put
(
"state"
,
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
resultMap
.
put
(
"stateName"
,
SpecialPerformanceEnum
.
StateEnum
.
END
.
getDes
());
resultMap
.
put
(
"stateName"
,
SpecialPerformanceEnum
.
StateEnum
.
END
.
getDes
());
}
else
{
}
else
{
...
@@ -567,7 +571,6 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -567,7 +571,6 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
logger
.
info
(
"================专场id: {}, 即将开始通知消息全部发送成功 =============="
,
specialPerformance
.
getId
());
logger
.
info
(
"================专场id: {}, 即将开始通知消息全部发送成功 =============="
,
specialPerformance
.
getId
());
}
}
private
void
sendStartSubscribeMsg
(
SpecialPerformance
specialPerformance
,
DisposableSubscribeRecord
disposableSubscribeRecord
,
String
msg
){
private
void
sendStartSubscribeMsg
(
SpecialPerformance
specialPerformance
,
DisposableSubscribeRecord
disposableSubscribeRecord
,
String
msg
){
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
=
new
AuctionOfferNoticeMsg
();
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
=
new
AuctionOfferNoticeMsg
();
auctionOfferNoticeMsg
.
setSpecialPerformanceTitle
(
specialPerformance
.
getTitle
());
auctionOfferNoticeMsg
.
setSpecialPerformanceTitle
(
specialPerformance
.
getTitle
());
...
@@ -588,6 +591,28 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -588,6 +591,28 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
disposableSubscribeRecordDao
.
updateInvalid
(
disposableSubscribeRecord
.
getOpenid
(),
disposableSubscribeRecord
.
getTargetId
(),
disposableSubscribeRecord
.
getTemplateId
());
disposableSubscribeRecordDao
.
updateInvalid
(
disposableSubscribeRecord
.
getOpenid
(),
disposableSubscribeRecord
.
getTargetId
(),
disposableSubscribeRecord
.
getTemplateId
());
}
}
@Override
public
Result
offShelvesItemOfSpecialPerformance
(
int
specialPerformanceId
)
{
try
{
List
<
SpecialPerformanceConfig
>
list
=
specialPerformanceConfigDao
.
findAllItem
(
specialPerformanceId
);
for
(
SpecialPerformanceConfig
specialPerformanceConfig
:
list
)
{
long
itemId
=
specialPerformanceConfig
.
getItemId
();
SupplierItem
oldItem
=
supplierItemDao
.
findById
(
itemId
);
if
(
oldItem
.
getIsOnSale
())
{
return
Result
.
failed
(
"先下架商品"
);
}
SupplierItem
supplierItem
=
new
SupplierItem
();
supplierItem
.
setId
(
itemId
);
supplierItem
.
setIsDeleted
(
true
);
supplierItemDao
.
update
(
supplierItem
);
}
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"下架已结束的专场商品 error {}"
,
e
);
}
return
Result
.
failed
();
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/UserAccountDetailServiceImpl.java
View file @
5d2e2de9
...
@@ -2,10 +2,14 @@ package com.wwdz.ch.wx.impl.distribution;
...
@@ -2,10 +2,14 @@ package com.wwdz.ch.wx.impl.distribution;
import
com.wwdz.ch.core.consts.BillEnum
;
import
com.wwdz.ch.core.consts.BillEnum
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.db.dao.CollectorWhiteListDao
;
import
com.wwdz.ch.db.dao.distribution.DistributionOrderDao
;
import
com.wwdz.ch.db.dao.distribution.UserAccountDetailDao
;
import
com.wwdz.ch.db.dao.distribution.UserAccountDetailDao
;
import
com.wwdz.ch.db.dao.distribution.UserBillDao
;
import
com.wwdz.ch.db.dao.distribution.UserBillDao
;
import
com.wwdz.ch.db.domain.CollectorWhiteList
;
import
com.wwdz.ch.db.domain.distribution.DistributionOrder
;
import
com.wwdz.ch.db.domain.distribution.DistributionOrder
;
import
com.wwdz.ch.db.domain.distribution.DistributorProfit
;
import
com.wwdz.ch.db.domain.distribution.DistributorProfit
;
import
com.wwdz.ch.db.domain.distribution.UserAccountDetail
;
import
com.wwdz.ch.db.domain.distribution.UserAccountDetail
;
...
@@ -40,6 +44,12 @@ public class UserAccountDetailServiceImpl implements UserAccountDetailService {
...
@@ -40,6 +44,12 @@ public class UserAccountDetailServiceImpl implements UserAccountDetailService {
@Autowired
@Autowired
UserBillService
userBillService
;
UserBillService
userBillService
;
@Autowired
CollectorWhiteListDao
collectorWhiteListDao
;
@Autowired
DistributionOrderDao
distributionOrderDao
;
@Transactional
(
propagation
=
Propagation
.
REQUIRED
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
)
@Override
@Override
...
@@ -84,7 +94,7 @@ public class UserAccountDetailServiceImpl implements UserAccountDetailService {
...
@@ -84,7 +94,7 @@ public class UserAccountDetailServiceImpl implements UserAccountDetailService {
||
CommConsts
.
SYSTEM_ACCOUNT
.
equals
(
distributionOrder
.
getShareRecordId
()))
{
||
CommConsts
.
SYSTEM_ACCOUNT
.
equals
(
distributionOrder
.
getShareRecordId
()))
{
introduceAccountDetail
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT
);
introduceAccountDetail
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT
);
}
else
{
}
else
{
introduceAccountDetail
.
setUserId
(
Long
.
valueOf
(
distributionOrder
.
getShareRecordId
()
));
introduceAccountDetail
.
setUserId
(
distributionOrder
.
getIntroducerId
()
==
null
?
Long
.
valueOf
(
distributionOrder
.
getShareRecordId
())
:
distributionOrder
.
getIntroducerId
(
));
}
}
introduceAccountDetail
.
setTransactionId
(
distributionOrder
.
getDistributionOrderId
());
introduceAccountDetail
.
setTransactionId
(
distributionOrder
.
getDistributionOrderId
());
introduceAccountDetail
.
setAmount
(
introduceCost
);
introduceAccountDetail
.
setAmount
(
introduceCost
);
...
@@ -95,6 +105,20 @@ public class UserAccountDetailServiceImpl implements UserAccountDetailService {
...
@@ -95,6 +105,20 @@ public class UserAccountDetailServiceImpl implements UserAccountDetailService {
introduceAccountDetail
.
setCreateTime
(
distributionOrder
.
getCreateTime
());
introduceAccountDetail
.
setCreateTime
(
distributionOrder
.
getCreateTime
());
userAccountDetailDao
.
insert
(
introduceAccountDetail
);
userAccountDetailDao
.
insert
(
introduceAccountDetail
);
//更新订单表中的佣金字段
DistributionOrder
updateDto
=
new
DistributionOrder
();
updateDto
.
setDistributionOrderId
(
distributionOrder
.
getDistributionOrderId
());
updateDto
.
setSupplyPrice
(
distributorProfit
.
getItemCost
());
updateDto
.
setIntroduceAmount
(
introduceCost
);
updateDto
.
setChannelAmount
(
channelCost
);
//查询平台佣金,拍卖和团购的不需要计算平台佣金比例,直接用供货价结算
if
(
distributionOrder
.
getType
()
==
DistributionEnum
.
DistributionTypeEnum
.
FIXED_PRICE
.
getCode
()
||
distributionOrder
.
getType
()
==
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
())
{
CollectorWhiteList
collectorWhiteList
=
collectorWhiteListDao
.
findById
(
distributionOrder
.
getSellerId
());
updateDto
.
setChannelRebate
(
collectorWhiteList
.
getChannelCostRebate
());
}
distributionOrderDao
.
update
(
distributionOrder
);
//计算用户账单
//计算用户账单
Result
result
=
userBillService
.
payCalculate
(
distributionOrder
,
distributorProfit
);
Result
result
=
userBillService
.
payCalculate
(
distributionOrder
,
distributorProfit
);
if
(!
result
.
getSuccess
())
{
if
(!
result
.
getSuccess
())
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
View file @
5d2e2de9
...
@@ -24,6 +24,7 @@ import com.wwdz.ch.db.dto.request.distribution.DisposableSubscribeRecordRequestD
...
@@ -24,6 +24,7 @@ import com.wwdz.ch.db.dto.request.distribution.DisposableSubscribeRecordRequestD
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceConfigRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceConfigRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceRequestDto
;
import
com.wwdz.ch.wx.service.distribution.DistributionOrderService
;
import
com.wwdz.ch.wx.service.distribution.DistributionOrderService
;
import
com.wwdz.ch.wx.service.distribution.SpecialPerformanceService
;
import
com.xxdxxs.utils.DateUtils
;
import
com.xxdxxs.utils.DateUtils
;
import
com.xxdxxs.utils.JsonUtils
;
import
com.xxdxxs.utils.JsonUtils
;
import
com.xxdxxs.utils.StringUtils
;
import
com.xxdxxs.utils.StringUtils
;
...
@@ -70,6 +71,9 @@ public class SpecialPerformanceNoticeJob {
...
@@ -70,6 +71,9 @@ public class SpecialPerformanceNoticeJob {
@Autowired
@Autowired
SpecialPerformanceConfigDao
specialPerformanceConfigDao
;
SpecialPerformanceConfigDao
specialPerformanceConfigDao
;
@Autowired
SpecialPerformanceService
specialPerformanceService
;
@Autowired
@Autowired
RedissonClient
redissonClient
;
RedissonClient
redissonClient
;
...
@@ -424,11 +428,15 @@ public class SpecialPerformanceNoticeJob {
...
@@ -424,11 +428,15 @@ public class SpecialPerformanceNoticeJob {
}
else
if
(
specialPerformance
.
getEndTime
().
before
(
now
))
{
}
else
if
(
specialPerformance
.
getEndTime
().
before
(
now
))
{
//超过结束时间,状态设置为结束
//超过结束时间,状态设置为结束
specialPerformanceDao
.
updateState
(
specialPerformance
.
getId
(),
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
specialPerformanceDao
.
updateState
(
specialPerformance
.
getId
(),
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
//删除专场商品
specialPerformanceService
.
offShelvesItemOfSpecialPerformance
(
specialPerformance
.
getId
());
}
}
}
else
if
(
specialPerformance
.
getState
().
intValue
()
==
SpecialPerformanceEnum
.
StateEnum
.
PROCESSING
.
getCode
())
{
}
else
if
(
specialPerformance
.
getState
().
intValue
()
==
SpecialPerformanceEnum
.
StateEnum
.
PROCESSING
.
getCode
())
{
//超过结束时间,状态设置为结束
//超过结束时间,状态设置为结束
if
(
specialPerformance
.
getEndTime
().
before
(
now
))
{
if
(
specialPerformance
.
getEndTime
().
before
(
now
))
{
specialPerformanceDao
.
updateState
(
specialPerformance
.
getId
(),
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
specialPerformanceDao
.
updateState
(
specialPerformance
.
getId
(),
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
//删除专场商品
specialPerformanceService
.
offShelvesItemOfSpecialPerformance
(
specialPerformance
.
getId
());
}
}
}
}
//查询该专场下的商品,自动更新状态
//查询该专场下的商品,自动更新状态
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/SpecialPerformanceService.java
View file @
5d2e2de9
...
@@ -27,6 +27,13 @@ public interface SpecialPerformanceService {
...
@@ -27,6 +27,13 @@ public interface SpecialPerformanceService {
*/
*/
Result
findItemList
(
SpecialPerformanceRequestDto
dto
);
Result
findItemList
(
SpecialPerformanceRequestDto
dto
);
/**
* 专场结束删除对应商品
* @param specialPerformanceId
* @return
*/
Result
offShelvesItemOfSpecialPerformance
(
int
specialPerformanceId
);
/**
/**
* 手动发送专场进行中短信给用户
* 手动发送专场进行中短信给用户
* @return
* @return
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/GroupPurchaseController.java
View file @
5d2e2de9
...
@@ -44,8 +44,8 @@ public class GroupPurchaseController {
...
@@ -44,8 +44,8 @@ public class GroupPurchaseController {
@ApiOperation
(
value
=
"取消团购订单"
)
@ApiOperation
(
value
=
"取消团购订单"
)
@PostMapping
(
"/cancel
Deposit
"
)
@PostMapping
(
"/cancel
Order
"
)
public
Result
cancel
Deposit
(
@RequestBody
GroupPurchaseRecordRequestDto
dto
)
{
public
Result
cancel
Order
(
@RequestBody
GroupPurchaseRecordRequestDto
dto
)
{
logger
.
info
(
"取消团购订单,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"取消团购订单,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(!
StringUtils
.
isAllNotEmpty
(
dto
.
getDistributionOrderId
()))
{
if
(!
StringUtils
.
isAllNotEmpty
(
dto
.
getDistributionOrderId
()))
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
...
...
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