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
ac94eea4
Commit
ac94eea4
authored
Jul 10, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算平台佣金的新逻辑
parent
c18c027e
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
3306 additions
and
184 deletions
+3306
-184
ch-core/src/main/java/com/wwdz/ch/core/consts/BillEnum.java
ch-core/src/main/java/com/wwdz/ch/core/consts/BillEnum.java
+117
-0
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
...ore/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
+9
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/DistributorProfit.java
...com/wwdz/ch/db/domain/distribution/DistributorProfit.java
+11
-4
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/DistributorProfitExample.java
...z/ch/db/domain/distribution/DistributorProfitExample.java
+132
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserAccountDetail.java
...com/wwdz/ch/db/domain/distribution/UserAccountDetail.java
+18
-9
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserAccountDetailExample.java
...z/ch/db/domain/distribution/UserAccountDetailExample.java
+172
-40
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserBill.java
...ain/java/com/wwdz/ch/db/domain/distribution/UserBill.java
+319
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserBillExample.java
...a/com/wwdz/ch/db/domain/distribution/UserBillExample.java
+1774
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/DistributorProfitRequestDto.java
...dto/request/distribution/DistributorProfitRequestDto.java
+6
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/UserAccountDetailRequestDto.java
...dto/request/distribution/UserAccountDetailRequestDto.java
+12
-6
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/UserBillRequestDto.java
...dz/ch/db/dto/request/distribution/UserBillRequestDto.java
+61
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/UserAccountDetailDaoImpl.java
...wdz/ch/db/impl/distribution/UserAccountDetailDaoImpl.java
+4
-5
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/UserBillMapper.java
...va/com/wwdz/ch/db/mapper/distribution/UserBillMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/DistributorProfitMapper.xml
...wdz/ch/db/mapper/distribution/DistributorProfitMapper.xml
+29
-15
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/UserAccountDetailMapper.xml
...wdz/ch/db/mapper/distribution/UserAccountDetailMapper.xml
+42
-24
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/UserBillMapper.xml
...ces/com/wwdz/ch/db/mapper/distribution/UserBillMapper.xml
+408
-0
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
+37
-65
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+17
-13
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/UserAccountDetailServiceImpl.java
...ch/wx/impl/distribution/UserAccountDetailServiceImpl.java
+65
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/UserAccountDetailService.java
.../ch/wx/service/distribution/UserAccountDetailService.java
+3
-1
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/BillEnum.java
0 → 100644
View file @
ac94eea4
package
com.wwdz.ch.core.consts
;
/**
* 账单类的枚举
*/
public
class
BillEnum
{
/**
* 用户账户明细的状态
*/
public
enum
AccountDetailStateEnum
{
ENTRY
(
1
,
"已入账"
),
WAIT_ENTRY
(
0
,
"待入账"
),
INVALID
(-
1
,
"无效"
),
;
private
int
code
;
private
String
des
;
AccountDetailStateEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
BillEnum
.
AccountDetailStateEnum
accountDetailStateEnum
:
BillEnum
.
AccountDetailStateEnum
.
values
())
{
if
(
code
==
accountDetailStateEnum
.
getCode
())
{
return
accountDetailStateEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
/**
* 用户账户明细的类型
*/
public
enum
AccountDetailTypeEnum
{
ORDER
(
1
,
"订单收入"
),
CHANNEL
(
2
,
"平台佣金"
),
INTRODUCE
(
3
,
"介绍佣金"
),
;
private
int
code
;
private
String
des
;
AccountDetailTypeEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
BillEnum
.
AccountDetailTypeEnum
accountDetailTypeEnum
:
BillEnum
.
AccountDetailTypeEnum
.
values
())
{
if
(
code
==
accountDetailTypeEnum
.
getCode
())
{
return
accountDetailTypeEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
/**
* 用户账户明细收支类型
*/
public
enum
FundTypeEnum
{
INCOME
(
1
,
"收入"
),
EXPENDITURE
(-
1
,
"支出"
),
;
private
int
code
;
private
String
des
;
FundTypeEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
BillEnum
.
FundTypeEnum
fundTypeEnum
:
BillEnum
.
FundTypeEnum
.
values
())
{
if
(
code
==
fundTypeEnum
.
getCode
())
{
return
fundTypeEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
}
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
View file @
ac94eea4
package
com.wwdz.ch.core.consts
;
import
tk.mybatis.spring.mapper.SpringBootBindUtil
;
import
java.math.BigDecimal
;
/**
* 一些常用的参数定义
*
...
...
@@ -84,4 +88,9 @@ public interface CommConsts {
* 消息跳转专场拍品详情
*/
public
final
static
String
ITEM_OF_SPECIAL_PERFORMANCE_URL
=
"/pages/saleAuctionDetail/index"
;
/**
* 微信手续费,按照最高的1%计算
*/
public
final
static
double
WX_COMMISSION_REBATE
=
0.01
;
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/DistributorProfit.java
View file @
ac94eea4
...
...
@@ -4,16 +4,14 @@ import java.io.Serializable;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/0
5/14
* @date 2024/0
7/10
*/
@Data
public
class
DistributorProfit
implements
Entity
{
public
class
DistributorProfit
implements
Serializable
{
private
Long
id
;
/**
...
...
@@ -41,6 +39,11 @@ public class DistributorProfit implements Entity {
*/
private
Long
amount
;
/**
* 实际到账金额
*/
private
Long
realAmount
;
/**
* 商品成本,供货价
*/
...
...
@@ -90,6 +93,7 @@ public class DistributorProfit implements Entity {
sb
.
append
(
", itemId="
).
append
(
itemId
);
sb
.
append
(
", itemNum="
).
append
(
itemNum
);
sb
.
append
(
", amount="
).
append
(
amount
);
sb
.
append
(
", realAmount="
).
append
(
realAmount
);
sb
.
append
(
", itemCost="
).
append
(
itemCost
);
sb
.
append
(
", channelCost="
).
append
(
channelCost
);
sb
.
append
(
", introduceCost="
).
append
(
introduceCost
);
...
...
@@ -120,6 +124,7 @@ public class DistributorProfit implements Entity {
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()))
&&
(
this
.
getItemNum
()
==
null
?
other
.
getItemNum
()
==
null
:
this
.
getItemNum
().
equals
(
other
.
getItemNum
()))
&&
(
this
.
getAmount
()
==
null
?
other
.
getAmount
()
==
null
:
this
.
getAmount
().
equals
(
other
.
getAmount
()))
&&
(
this
.
getRealAmount
()
==
null
?
other
.
getRealAmount
()
==
null
:
this
.
getRealAmount
().
equals
(
other
.
getRealAmount
()))
&&
(
this
.
getItemCost
()
==
null
?
other
.
getItemCost
()
==
null
:
this
.
getItemCost
().
equals
(
other
.
getItemCost
()))
&&
(
this
.
getChannelCost
()
==
null
?
other
.
getChannelCost
()
==
null
:
this
.
getChannelCost
().
equals
(
other
.
getChannelCost
()))
&&
(
this
.
getIntroduceCost
()
==
null
?
other
.
getIntroduceCost
()
==
null
:
this
.
getIntroduceCost
().
equals
(
other
.
getIntroduceCost
()))
...
...
@@ -139,6 +144,7 @@ public class DistributorProfit implements Entity {
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
result
=
prime
*
result
+
((
getItemNum
()
==
null
)
?
0
:
getItemNum
().
hashCode
());
result
=
prime
*
result
+
((
getAmount
()
==
null
)
?
0
:
getAmount
().
hashCode
());
result
=
prime
*
result
+
((
getRealAmount
()
==
null
)
?
0
:
getRealAmount
().
hashCode
());
result
=
prime
*
result
+
((
getItemCost
()
==
null
)
?
0
:
getItemCost
().
hashCode
());
result
=
prime
*
result
+
((
getChannelCost
()
==
null
)
?
0
:
getChannelCost
().
hashCode
());
result
=
prime
*
result
+
((
getIntroduceCost
()
==
null
)
?
0
:
getIntroduceCost
().
hashCode
());
...
...
@@ -163,6 +169,7 @@ public class DistributorProfit implements Entity {
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
),
itemNum
(
"item_num"
,
"itemNum"
,
"INTEGER"
,
false
),
amount
(
"amount"
,
"amount"
,
"BIGINT"
,
false
),
realAmount
(
"real_amount"
,
"realAmount"
,
"BIGINT"
,
false
),
itemCost
(
"item_cost"
,
"itemCost"
,
"BIGINT"
,
false
),
channelCost
(
"channel_cost"
,
"channelCost"
,
"BIGINT"
,
false
),
introduceCost
(
"introduce_cost"
,
"introduceCost"
,
"BIGINT"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/DistributorProfitExample.java
View file @
ac94eea4
...
...
@@ -950,6 +950,138 @@ public class DistributorProfitExample {
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountIsNull
()
{
addCriterion
(
"real_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountIsNotNull
()
{
addCriterion
(
"real_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountEqualTo
(
Long
value
)
{
addCriterion
(
"real_amount ="
,
value
,
"realAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distributor_profit
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRealAmountEqualToColumn
(
DistributorProfit
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"real_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"real_amount <>"
,
value
,
"realAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distributor_profit
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRealAmountNotEqualToColumn
(
DistributorProfit
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"real_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"real_amount >"
,
value
,
"realAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distributor_profit
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRealAmountGreaterThanColumn
(
DistributorProfit
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"real_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"real_amount >="
,
value
,
"realAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distributor_profit
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRealAmountGreaterThanOrEqualToColumn
(
DistributorProfit
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"real_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountLessThan
(
Long
value
)
{
addCriterion
(
"real_amount <"
,
value
,
"realAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distributor_profit
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRealAmountLessThanColumn
(
DistributorProfit
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"real_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"real_amount <="
,
value
,
"realAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table distributor_profit
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRealAmountLessThanOrEqualToColumn
(
DistributorProfit
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"real_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"real_amount in"
,
values
,
"realAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"real_amount not in"
,
values
,
"realAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"real_amount between"
,
value1
,
value2
,
"realAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRealAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"real_amount not between"
,
value1
,
value2
,
"realAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemCostIsNull
()
{
addCriterion
(
"item_cost is null"
);
return
(
Criteria
)
this
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserAccountDetail.java
View file @
ac94eea4
...
...
@@ -10,7 +10,7 @@ import lombok.Data;
/**
* @author shiyu
* @date 2024/07/
08
* @date 2024/07/
10
*/
@Data
public
class
UserAccountDetail
implements
Entity
{
...
...
@@ -22,9 +22,14 @@ public class UserAccountDetail implements Entity {
private
Long
userId
;
/**
*
订单
id
*
交易
id
*/
private
String
orderId
;
private
String
transactionId
;
/**
* 金额
*/
private
Long
amount
;
/**
* 收入或支出的类型
...
...
@@ -37,12 +42,12 @@ public class UserAccountDetail implements Entity {
private
Integer
fundType
;
/**
* 状态
* 状态
:待入账;已入账;无效
*/
private
Integer
state
;
/**
* 创建时间
* 创建时间
(订单创建时间)
*/
private
Date
createTime
;
...
...
@@ -61,7 +66,8 @@ public class UserAccountDetail implements Entity {
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", orderId="
).
append
(
orderId
);
sb
.
append
(
", transactionId="
).
append
(
transactionId
);
sb
.
append
(
", amount="
).
append
(
amount
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", fundType="
).
append
(
fundType
);
sb
.
append
(
", state="
).
append
(
state
);
...
...
@@ -86,7 +92,8 @@ public class UserAccountDetail implements Entity {
UserAccountDetail
other
=
(
UserAccountDetail
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getOrderId
()
==
null
?
other
.
getOrderId
()
==
null
:
this
.
getOrderId
().
equals
(
other
.
getOrderId
()))
&&
(
this
.
getTransactionId
()
==
null
?
other
.
getTransactionId
()
==
null
:
this
.
getTransactionId
().
equals
(
other
.
getTransactionId
()))
&&
(
this
.
getAmount
()
==
null
?
other
.
getAmount
()
==
null
:
this
.
getAmount
().
equals
(
other
.
getAmount
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()))
&&
(
this
.
getFundType
()
==
null
?
other
.
getFundType
()
==
null
:
this
.
getFundType
().
equals
(
other
.
getFundType
()))
&&
(
this
.
getState
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
...
...
@@ -100,7 +107,8 @@ public class UserAccountDetail implements Entity {
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getOrderId
()
==
null
)
?
0
:
getOrderId
().
hashCode
());
result
=
prime
*
result
+
((
getTransactionId
()
==
null
)
?
0
:
getTransactionId
().
hashCode
());
result
=
prime
*
result
+
((
getAmount
()
==
null
)
?
0
:
getAmount
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getFundType
()
==
null
)
?
0
:
getFundType
().
hashCode
());
result
=
prime
*
result
+
((
getState
()
==
null
)
?
0
:
getState
().
hashCode
());
...
...
@@ -119,7 +127,8 @@ public class UserAccountDetail implements Entity {
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
orderId
(
"order_id"
,
"orderId"
,
"VARCHAR"
,
false
),
transactionId
(
"transaction_id"
,
"transactionId"
,
"VARCHAR"
,
false
),
amount
(
"amount"
,
"amount"
,
"BIGINT"
,
false
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
),
fundType
(
"fund_type"
,
"fundType"
,
"INTEGER"
,
false
),
state
(
"state"
,
"state"
,
"INTEGER"
,
true
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserAccountDetailExample.java
View file @
ac94eea4
...
...
@@ -412,18 +412,18 @@ public class UserAccountDetailExample {
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdIsNull
()
{
addCriterion
(
"
order
_id is null"
);
public
Criteria
and
Transaction
IdIsNull
()
{
addCriterion
(
"
transaction
_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdIsNotNull
()
{
addCriterion
(
"
order
_id is not null"
);
public
Criteria
and
Transaction
IdIsNotNull
()
{
addCriterion
(
"
transaction
_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdEqualTo
(
String
value
)
{
addCriterion
(
"
order_id ="
,
value
,
"order
Id"
);
public
Criteria
and
Transaction
IdEqualTo
(
String
value
)
{
addCriterion
(
"
transaction_id ="
,
value
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -434,13 +434,13 @@ public class UserAccountDetailExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Order
IdEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
order
_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Transaction
IdEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
transaction
_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdNotEqualTo
(
String
value
)
{
addCriterion
(
"
order_id <>"
,
value
,
"order
Id"
);
public
Criteria
and
Transaction
IdNotEqualTo
(
String
value
)
{
addCriterion
(
"
transaction_id <>"
,
value
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -451,13 +451,13 @@ public class UserAccountDetailExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Order
IdNotEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
order
_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Transaction
IdNotEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
transaction
_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdGreaterThan
(
String
value
)
{
addCriterion
(
"
order_id >"
,
value
,
"order
Id"
);
public
Criteria
and
Transaction
IdGreaterThan
(
String
value
)
{
addCriterion
(
"
transaction_id >"
,
value
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -468,13 +468,13 @@ public class UserAccountDetailExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Order
IdGreaterThanColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
order
_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Transaction
IdGreaterThanColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
transaction
_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
order_id >="
,
value
,
"order
Id"
);
public
Criteria
and
Transaction
IdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
transaction_id >="
,
value
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -485,13 +485,13 @@ public class UserAccountDetailExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Order
IdGreaterThanOrEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
order
_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Transaction
IdGreaterThanOrEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
transaction
_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdLessThan
(
String
value
)
{
addCriterion
(
"
order_id <"
,
value
,
"order
Id"
);
public
Criteria
and
Transaction
IdLessThan
(
String
value
)
{
addCriterion
(
"
transaction_id <"
,
value
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -502,13 +502,13 @@ public class UserAccountDetailExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Order
IdLessThanColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
order
_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Transaction
IdLessThanColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
transaction
_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
order_id <="
,
value
,
"order
Id"
);
public
Criteria
and
Transaction
IdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
transaction_id <="
,
value
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -519,38 +519,170 @@ public class UserAccountDetailExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
Order
IdLessThanOrEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
order
_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
Transaction
IdLessThanOrEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
transaction
_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdLike
(
String
value
)
{
addCriterion
(
"
order_id like"
,
value
,
"order
Id"
);
public
Criteria
and
Transaction
IdLike
(
String
value
)
{
addCriterion
(
"
transaction_id like"
,
value
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdNotLike
(
String
value
)
{
addCriterion
(
"
order_id not like"
,
value
,
"order
Id"
);
public
Criteria
and
Transaction
IdNotLike
(
String
value
)
{
addCriterion
(
"
transaction_id not like"
,
value
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdIn
(
List
<
String
>
values
)
{
addCriterion
(
"
order_id in"
,
values
,
"order
Id"
);
public
Criteria
and
Transaction
IdIn
(
List
<
String
>
values
)
{
addCriterion
(
"
transaction_id in"
,
values
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
order_id not in"
,
values
,
"order
Id"
);
public
Criteria
and
Transaction
IdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
transaction_id not in"
,
values
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Order
IdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
order_id between"
,
value1
,
value2
,
"order
Id"
);
public
Criteria
and
Transaction
IdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
transaction_id between"
,
value1
,
value2
,
"transaction
Id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"order_id not between"
,
value1
,
value2
,
"orderId"
);
public
Criteria
andTransactionIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"transaction_id not between"
,
value1
,
value2
,
"transactionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAmountIsNull
()
{
addCriterion
(
"amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAmountIsNotNull
()
{
addCriterion
(
"amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAmountEqualTo
(
Long
value
)
{
addCriterion
(
"amount ="
,
value
,
"amount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAmountEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"amount <>"
,
value
,
"amount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAmountNotEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"amount >"
,
value
,
"amount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAmountGreaterThanColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"amount >="
,
value
,
"amount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAmountGreaterThanOrEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAmountLessThan
(
Long
value
)
{
addCriterion
(
"amount <"
,
value
,
"amount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAmountLessThanColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"amount <="
,
value
,
"amount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAmountLessThanOrEqualToColumn
(
UserAccountDetail
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"amount in"
,
values
,
"amount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"amount not in"
,
values
,
"amount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"amount between"
,
value1
,
value2
,
"amount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"amount not between"
,
value1
,
value2
,
"amount"
);
return
(
Criteria
)
this
;
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserBill.java
0 → 100644
View file @
ac94eea4
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/07/10
*/
@Data
public
class
UserBill
implements
Entity
{
private
Integer
id
;
/**
* 账单id
*/
private
String
billId
;
/**
* 账期
*/
private
String
accountPeriod
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 总入账金额
*/
private
Long
totalEntryAmount
;
/**
* 总待入账金额
*/
private
Long
totalWaitEntryAmount
;
/**
* 订单入账金额
*/
private
Long
orderEntryAmount
;
/**
* 订单待入账金额
*/
private
Long
orderWaitEntryAmount
;
/**
* 介绍佣金入账金额
*/
private
Long
introduceEntryAmount
;
/**
* 介绍佣金待入账金额
*/
private
Long
introduceWaitEntryAmount
;
/**
* 状态
*/
private
Integer
state
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", billId="
).
append
(
billId
);
sb
.
append
(
", accountPeriod="
).
append
(
accountPeriod
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", totalEntryAmount="
).
append
(
totalEntryAmount
);
sb
.
append
(
", totalWaitEntryAmount="
).
append
(
totalWaitEntryAmount
);
sb
.
append
(
", orderEntryAmount="
).
append
(
orderEntryAmount
);
sb
.
append
(
", orderWaitEntryAmount="
).
append
(
orderWaitEntryAmount
);
sb
.
append
(
", introduceEntryAmount="
).
append
(
introduceEntryAmount
);
sb
.
append
(
", introduceWaitEntryAmount="
).
append
(
introduceWaitEntryAmount
);
sb
.
append
(
", state="
).
append
(
state
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
UserBill
other
=
(
UserBill
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getBillId
()
==
null
?
other
.
getBillId
()
==
null
:
this
.
getBillId
().
equals
(
other
.
getBillId
()))
&&
(
this
.
getAccountPeriod
()
==
null
?
other
.
getAccountPeriod
()
==
null
:
this
.
getAccountPeriod
().
equals
(
other
.
getAccountPeriod
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getTotalEntryAmount
()
==
null
?
other
.
getTotalEntryAmount
()
==
null
:
this
.
getTotalEntryAmount
().
equals
(
other
.
getTotalEntryAmount
()))
&&
(
this
.
getTotalWaitEntryAmount
()
==
null
?
other
.
getTotalWaitEntryAmount
()
==
null
:
this
.
getTotalWaitEntryAmount
().
equals
(
other
.
getTotalWaitEntryAmount
()))
&&
(
this
.
getOrderEntryAmount
()
==
null
?
other
.
getOrderEntryAmount
()
==
null
:
this
.
getOrderEntryAmount
().
equals
(
other
.
getOrderEntryAmount
()))
&&
(
this
.
getOrderWaitEntryAmount
()
==
null
?
other
.
getOrderWaitEntryAmount
()
==
null
:
this
.
getOrderWaitEntryAmount
().
equals
(
other
.
getOrderWaitEntryAmount
()))
&&
(
this
.
getIntroduceEntryAmount
()
==
null
?
other
.
getIntroduceEntryAmount
()
==
null
:
this
.
getIntroduceEntryAmount
().
equals
(
other
.
getIntroduceEntryAmount
()))
&&
(
this
.
getIntroduceWaitEntryAmount
()
==
null
?
other
.
getIntroduceWaitEntryAmount
()
==
null
:
this
.
getIntroduceWaitEntryAmount
().
equals
(
other
.
getIntroduceWaitEntryAmount
()))
&&
(
this
.
getState
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getBillId
()
==
null
)
?
0
:
getBillId
().
hashCode
());
result
=
prime
*
result
+
((
getAccountPeriod
()
==
null
)
?
0
:
getAccountPeriod
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getTotalEntryAmount
()
==
null
)
?
0
:
getTotalEntryAmount
().
hashCode
());
result
=
prime
*
result
+
((
getTotalWaitEntryAmount
()
==
null
)
?
0
:
getTotalWaitEntryAmount
().
hashCode
());
result
=
prime
*
result
+
((
getOrderEntryAmount
()
==
null
)
?
0
:
getOrderEntryAmount
().
hashCode
());
result
=
prime
*
result
+
((
getOrderWaitEntryAmount
()
==
null
)
?
0
:
getOrderWaitEntryAmount
().
hashCode
());
result
=
prime
*
result
+
((
getIntroduceEntryAmount
()
==
null
)
?
0
:
getIntroduceEntryAmount
().
hashCode
());
result
=
prime
*
result
+
((
getIntroduceWaitEntryAmount
()
==
null
)
?
0
:
getIntroduceWaitEntryAmount
().
hashCode
());
result
=
prime
*
result
+
((
getState
()
==
null
)
?
0
:
getState
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
billId
(
"bill_id"
,
"billId"
,
"VARCHAR"
,
false
),
accountPeriod
(
"account_period"
,
"accountPeriod"
,
"VARCHAR"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
totalEntryAmount
(
"total_entry_amount"
,
"totalEntryAmount"
,
"BIGINT"
,
false
),
totalWaitEntryAmount
(
"total_wait_entry_amount"
,
"totalWaitEntryAmount"
,
"BIGINT"
,
false
),
orderEntryAmount
(
"order_entry_amount"
,
"orderEntryAmount"
,
"BIGINT"
,
false
),
orderWaitEntryAmount
(
"order_wait_entry_amount"
,
"orderWaitEntryAmount"
,
"BIGINT"
,
false
),
introduceEntryAmount
(
"introduce_entry_amount"
,
"introduceEntryAmount"
,
"BIGINT"
,
false
),
introduceWaitEntryAmount
(
"introduce_wait_entry_amount"
,
"introduceWaitEntryAmount"
,
"BIGINT"
,
false
),
state
(
"state"
,
"state"
,
"INTEGER"
,
true
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserBillExample.java
0 → 100644
View file @
ac94eea4
package
com.wwdz.ch.db.domain.distribution
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
UserBillExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
UserBillExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
UserBillExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
UserBillExample
orderBy
(
String
...
orderByClauses
)
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
sb
.
append
(
orderByClauses
[
i
]);
if
(
i
<
orderByClauses
.
length
-
1
)
{
sb
.
append
(
" , "
);
}
}
this
.
setOrderByClause
(
sb
.
toString
());
return
this
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
(
this
);
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
UserBillExample
example
=
new
UserBillExample
();
return
example
.
createCriteria
();
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdIsNull
()
{
addCriterion
(
"bill_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdIsNotNull
()
{
addCriterion
(
"bill_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdEqualTo
(
String
value
)
{
addCriterion
(
"bill_id ="
,
value
,
"billId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andBillIdEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"bill_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdNotEqualTo
(
String
value
)
{
addCriterion
(
"bill_id <>"
,
value
,
"billId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andBillIdNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"bill_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdGreaterThan
(
String
value
)
{
addCriterion
(
"bill_id >"
,
value
,
"billId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andBillIdGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"bill_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"bill_id >="
,
value
,
"billId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andBillIdGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"bill_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdLessThan
(
String
value
)
{
addCriterion
(
"bill_id <"
,
value
,
"billId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andBillIdLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"bill_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"bill_id <="
,
value
,
"billId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andBillIdLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"bill_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdLike
(
String
value
)
{
addCriterion
(
"bill_id like"
,
value
,
"billId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdNotLike
(
String
value
)
{
addCriterion
(
"bill_id not like"
,
value
,
"billId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"bill_id in"
,
values
,
"billId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"bill_id not in"
,
values
,
"billId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"bill_id between"
,
value1
,
value2
,
"billId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBillIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"bill_id not between"
,
value1
,
value2
,
"billId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodIsNull
()
{
addCriterion
(
"account_period is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodIsNotNull
()
{
addCriterion
(
"account_period is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodEqualTo
(
String
value
)
{
addCriterion
(
"account_period ="
,
value
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAccountPeriodEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"account_period = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodNotEqualTo
(
String
value
)
{
addCriterion
(
"account_period <>"
,
value
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAccountPeriodNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"account_period <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodGreaterThan
(
String
value
)
{
addCriterion
(
"account_period >"
,
value
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAccountPeriodGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"account_period > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"account_period >="
,
value
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAccountPeriodGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"account_period >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodLessThan
(
String
value
)
{
addCriterion
(
"account_period <"
,
value
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAccountPeriodLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"account_period < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"account_period <="
,
value
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAccountPeriodLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"account_period <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodLike
(
String
value
)
{
addCriterion
(
"account_period like"
,
value
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodNotLike
(
String
value
)
{
addCriterion
(
"account_period not like"
,
value
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodIn
(
List
<
String
>
values
)
{
addCriterion
(
"account_period in"
,
values
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"account_period not in"
,
values
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"account_period between"
,
value1
,
value2
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccountPeriodNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"account_period not between"
,
value1
,
value2
,
"accountPeriod"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNull
()
{
addCriterion
(
"user_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNotNull
()
{
addCriterion
(
"user_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountIsNull
()
{
addCriterion
(
"total_entry_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountIsNotNull
()
{
addCriterion
(
"total_entry_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountEqualTo
(
Long
value
)
{
addCriterion
(
"total_entry_amount ="
,
value
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalEntryAmountEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_entry_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"total_entry_amount <>"
,
value
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalEntryAmountNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_entry_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"total_entry_amount >"
,
value
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalEntryAmountGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_entry_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"total_entry_amount >="
,
value
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalEntryAmountGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_entry_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountLessThan
(
Long
value
)
{
addCriterion
(
"total_entry_amount <"
,
value
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalEntryAmountLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_entry_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"total_entry_amount <="
,
value
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalEntryAmountLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_entry_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"total_entry_amount in"
,
values
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"total_entry_amount not in"
,
values
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"total_entry_amount between"
,
value1
,
value2
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalEntryAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"total_entry_amount not between"
,
value1
,
value2
,
"totalEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountIsNull
()
{
addCriterion
(
"total_wait_entry_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountIsNotNull
()
{
addCriterion
(
"total_wait_entry_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountEqualTo
(
Long
value
)
{
addCriterion
(
"total_wait_entry_amount ="
,
value
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalWaitEntryAmountEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_wait_entry_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"total_wait_entry_amount <>"
,
value
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalWaitEntryAmountNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_wait_entry_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"total_wait_entry_amount >"
,
value
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalWaitEntryAmountGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_wait_entry_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"total_wait_entry_amount >="
,
value
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalWaitEntryAmountGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_wait_entry_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountLessThan
(
Long
value
)
{
addCriterion
(
"total_wait_entry_amount <"
,
value
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalWaitEntryAmountLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_wait_entry_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"total_wait_entry_amount <="
,
value
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTotalWaitEntryAmountLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"total_wait_entry_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"total_wait_entry_amount in"
,
values
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"total_wait_entry_amount not in"
,
values
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"total_wait_entry_amount between"
,
value1
,
value2
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalWaitEntryAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"total_wait_entry_amount not between"
,
value1
,
value2
,
"totalWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountIsNull
()
{
addCriterion
(
"order_entry_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountIsNotNull
()
{
addCriterion
(
"order_entry_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountEqualTo
(
Long
value
)
{
addCriterion
(
"order_entry_amount ="
,
value
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderEntryAmountEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_entry_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"order_entry_amount <>"
,
value
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderEntryAmountNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_entry_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"order_entry_amount >"
,
value
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderEntryAmountGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_entry_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"order_entry_amount >="
,
value
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderEntryAmountGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_entry_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountLessThan
(
Long
value
)
{
addCriterion
(
"order_entry_amount <"
,
value
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderEntryAmountLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_entry_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"order_entry_amount <="
,
value
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderEntryAmountLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_entry_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"order_entry_amount in"
,
values
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"order_entry_amount not in"
,
values
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"order_entry_amount between"
,
value1
,
value2
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderEntryAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"order_entry_amount not between"
,
value1
,
value2
,
"orderEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountIsNull
()
{
addCriterion
(
"order_wait_entry_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountIsNotNull
()
{
addCriterion
(
"order_wait_entry_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountEqualTo
(
Long
value
)
{
addCriterion
(
"order_wait_entry_amount ="
,
value
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderWaitEntryAmountEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_wait_entry_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"order_wait_entry_amount <>"
,
value
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderWaitEntryAmountNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_wait_entry_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"order_wait_entry_amount >"
,
value
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderWaitEntryAmountGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_wait_entry_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"order_wait_entry_amount >="
,
value
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderWaitEntryAmountGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_wait_entry_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountLessThan
(
Long
value
)
{
addCriterion
(
"order_wait_entry_amount <"
,
value
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderWaitEntryAmountLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_wait_entry_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"order_wait_entry_amount <="
,
value
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andOrderWaitEntryAmountLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"order_wait_entry_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"order_wait_entry_amount in"
,
values
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"order_wait_entry_amount not in"
,
values
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"order_wait_entry_amount between"
,
value1
,
value2
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderWaitEntryAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"order_wait_entry_amount not between"
,
value1
,
value2
,
"orderWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountIsNull
()
{
addCriterion
(
"introduce_entry_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountIsNotNull
()
{
addCriterion
(
"introduce_entry_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_entry_amount ="
,
value
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceEntryAmountEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_entry_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_entry_amount <>"
,
value
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceEntryAmountNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_entry_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"introduce_entry_amount >"
,
value
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceEntryAmountGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_entry_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_entry_amount >="
,
value
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceEntryAmountGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_entry_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountLessThan
(
Long
value
)
{
addCriterion
(
"introduce_entry_amount <"
,
value
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceEntryAmountLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_entry_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_entry_amount <="
,
value
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceEntryAmountLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_entry_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"introduce_entry_amount in"
,
values
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"introduce_entry_amount not in"
,
values
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"introduce_entry_amount between"
,
value1
,
value2
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceEntryAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"introduce_entry_amount not between"
,
value1
,
value2
,
"introduceEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountIsNull
()
{
addCriterion
(
"introduce_wait_entry_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountIsNotNull
()
{
addCriterion
(
"introduce_wait_entry_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_wait_entry_amount ="
,
value
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceWaitEntryAmountEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_wait_entry_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_wait_entry_amount <>"
,
value
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceWaitEntryAmountNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_wait_entry_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"introduce_wait_entry_amount >"
,
value
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceWaitEntryAmountGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_wait_entry_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_wait_entry_amount >="
,
value
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceWaitEntryAmountGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_wait_entry_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountLessThan
(
Long
value
)
{
addCriterion
(
"introduce_wait_entry_amount <"
,
value
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceWaitEntryAmountLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_wait_entry_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"introduce_wait_entry_amount <="
,
value
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIntroduceWaitEntryAmountLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"introduce_wait_entry_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"introduce_wait_entry_amount in"
,
values
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"introduce_wait_entry_amount not in"
,
values
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"introduce_wait_entry_amount between"
,
value1
,
value2
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIntroduceWaitEntryAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"introduce_wait_entry_amount not between"
,
value1
,
value2
,
"introduceWaitEntryAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateIsNull
()
{
addCriterion
(
"`state` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateIsNotNull
()
{
addCriterion
(
"`state` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateEqualTo
(
Integer
value
)
{
addCriterion
(
"`state` ="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotEqualTo
(
Integer
value
)
{
addCriterion
(
"`state` <>"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateNotEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateGreaterThan
(
Integer
value
)
{
addCriterion
(
"`state` >"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateGreaterThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`state` >="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateGreaterThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateLessThan
(
Integer
value
)
{
addCriterion
(
"`state` <"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateLessThanColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`state` <="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateLessThanOrEqualToColumn
(
UserBill
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`state` in"
,
values
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`state` not in"
,
values
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`state` between"
,
value1
,
value2
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`state` not between"
,
value1
,
value2
,
"state"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
UserBillExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
UserBillExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
UserBillExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
if
(
ifAdd
)
{
add
.
add
(
this
);
}
return
this
;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
ICriteriaAdd
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria
add
(
Criteria
add
);
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/DistributorProfitRequestDto.java
View file @
ac94eea4
...
...
@@ -36,6 +36,12 @@ public class DistributorProfitRequestDto implements Entity {
*/
private
Long
amount
;
/**
* 实际金额
* 要扣除微信的手续费
*/
private
Long
realAmount
;
/**
* 商品成本,供货价
*/
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/UserAccountDetailRequestDto.java
View file @
ac94eea4
...
...
@@ -17,19 +17,25 @@ public class UserAccountDetailRequestDto extends BaseRequestDto implements Entit
private
Long
userId
;
/**
* 订单id
* 交易id
* 可以是订单号,也可以是转账记录id
*/
private
String
order
Id
;
private
String
transaction
Id
;
/**
*
批量查询订单id
*
金额
*/
private
L
ist
<
String
>
orderIdLis
t
;
private
L
ong
amoun
t
;
/**
*
查询时需要排除的订单
id
*
批量查询交易
id
*/
private
List
<
String
>
filterOrderIdList
;
private
List
<
String
>
transactionIdList
;
/**
* 查询时需要排除的交易id
*/
private
List
<
String
>
filterTransactionIdList
;
/**
* 收入或支出的类型
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/UserBillRequestDto.java
0 → 100644
View file @
ac94eea4
package
com.wwdz.ch.db.dto.request.distribution
;
import
com.wwdz.ch.db.dto.request.BaseRequestDto
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
@Data
public
class
UserBillRequestDto
extends
BaseRequestDto
implements
Entity
{
private
Integer
id
;
/**
* 账单id
*/
private
String
billId
;
/**
* 账期
*/
private
String
accountPeriod
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 总入账金额
*/
private
Long
totalEntryAmount
;
/**
* 总待入账金额
*/
private
Long
totalWaitEntryAmount
;
/**
* 订单入账金额
*/
private
Long
orderEntryAmount
;
/**
* 订单待入账金额
*/
private
Long
orderWaitEntryAmount
;
/**
* 介绍佣金入账金额
*/
private
Long
introduceEntryAmount
;
/**
* 介绍佣金待入账金额
*/
private
Long
introduceWaitEntryAmount
;
/**
* 状态
*/
private
Integer
state
;
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/UserAccountDetailDaoImpl.java
View file @
ac94eea4
...
...
@@ -21,7 +21,6 @@ public class UserAccountDetailDaoImpl implements UserAccountDetailDao {
@Override
public
boolean
insert
(
UserAccountDetail
userAccountDetail
)
{
userAccountDetail
.
setCreateTime
(
new
Date
());
userAccountDetail
.
setUpdateTime
(
new
Date
());
return
userAccountDetailMapper
.
insert
(
userAccountDetail
)
>
0
;
}
...
...
@@ -31,7 +30,7 @@ public class UserAccountDetailDaoImpl implements UserAccountDetailDao {
UserAccountDetailExample
example
=
new
UserAccountDetailExample
();
UserAccountDetailExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
userAccountDetail
.
getUserId
(),
criteria:
:
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
userAccountDetail
.
get
OrderId
(),
criteria:
:
andOrder
IdEqualTo
);
JdbcHelper
.
ifPresent
(
userAccountDetail
.
get
TransactionId
(),
criteria:
:
andTransaction
IdEqualTo
);
userAccountDetail
.
setUpdateTime
(
new
Date
());
return
userAccountDetailMapper
.
updateByExampleSelective
(
userAccountDetail
,
example
)
>
0
;
}
...
...
@@ -42,9 +41,9 @@ public class UserAccountDetailDaoImpl implements UserAccountDetailDao {
UserAccountDetailExample
example
=
new
UserAccountDetailExample
();
UserAccountDetailExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getUserId
(),
criteria:
:
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
get
OrderId
(),
criteria:
:
andOrder
IdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
get
OrderIdList
(),
criteria:
:
andOrder
IdIn
);
JdbcHelper
.
ifPresent
(
dto
.
getFilter
OrderIdList
(),
criteria:
:
andOrder
IdNotIn
);
JdbcHelper
.
ifPresent
(
dto
.
get
TransactionId
(),
criteria:
:
andTransaction
IdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
get
TransactionIdList
(),
criteria:
:
andTransaction
IdIn
);
JdbcHelper
.
ifPresent
(
dto
.
getFilter
TransactionIdList
(),
criteria:
:
andTransaction
IdNotIn
);
JdbcHelper
.
ifPresent
(
dto
.
getState
(),
criteria:
:
andStateEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getType
(),
criteria:
:
andTypeEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getFundType
(),
criteria:
:
andFundTypeEqualTo
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/UserBillMapper.java
0 → 100644
View file @
ac94eea4
package
com.wwdz.ch.db.mapper.distribution
;
import
com.wwdz.ch.db.domain.distribution.UserBill
;
import
com.wwdz.ch.db.domain.distribution.UserBillExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
UserBillMapper
{
long
countByExample
(
UserBillExample
example
);
int
deleteByExample
(
UserBillExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
UserBill
record
);
int
insertSelective
(
UserBill
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
UserBill
selectOneByExample
(
UserBillExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
UserBill
selectOneByExampleSelective
(
@Param
(
"example"
)
UserBillExample
example
,
@Param
(
"selective"
)
UserBill
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
UserBill
>
selectByExampleSelective
(
@Param
(
"example"
)
UserBillExample
example
,
@Param
(
"selective"
)
UserBill
.
Column
...
selective
);
List
<
UserBill
>
selectByExample
(
UserBillExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_bill
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
UserBill
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
UserBill
.
Column
...
selective
);
UserBill
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
UserBill
record
,
@Param
(
"example"
)
UserBillExample
example
);
int
updateByExample
(
@Param
(
"record"
)
UserBill
record
,
@Param
(
"example"
)
UserBillExample
example
);
int
updateByPrimaryKeySelective
(
UserBill
record
);
int
updateByPrimaryKey
(
UserBill
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/DistributorProfitMapper.xml
View file @
ac94eea4
...
...
@@ -8,6 +8,7 @@
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"item_num"
jdbcType=
"INTEGER"
property=
"itemNum"
/>
<result
column=
"amount"
jdbcType=
"BIGINT"
property=
"amount"
/>
<result
column=
"real_amount"
jdbcType=
"BIGINT"
property=
"realAmount"
/>
<result
column=
"item_cost"
jdbcType=
"BIGINT"
property=
"itemCost"
/>
<result
column=
"channel_cost"
jdbcType=
"BIGINT"
property=
"channelCost"
/>
<result
column=
"introduce_cost"
jdbcType=
"BIGINT"
property=
"introduceCost"
/>
...
...
@@ -16,7 +17,6 @@
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"is_valid"
jdbcType=
"BIT"
property=
"isValid"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
...
...
@@ -76,8 +76,8 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, distribution_order_id, distributor_id, item_id, item_num, amount,
item_cos
t,
channel_cost, introduce_cost, profit, create_time, `type`, is_valid
id, distribution_order_id, distributor_id, item_id, item_num, amount,
real_amoun
t,
item_cost,
channel_cost, introduce_cost, profit, create_time, `type`, is_valid
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributorProfitExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -112,8 +112,8 @@
</foreach>
</when>
<otherwise>
id, distribution_order_id, distributor_id, item_id, item_num, amount,
item_cos
t,
channel_cost, introduce_cost, profit, create_time, `type`, is_valid
id, distribution_order_id, distributor_id, item_id, item_num, amount,
real_amoun
t,
item_cost,
channel_cost, introduce_cost, profit, create_time, `type`, is_valid
</otherwise>
</choose>
from distributor_profit
...
...
@@ -144,8 +144,8 @@
</foreach>
</when>
<otherwise>
id, distribution_order_id, distributor_id, item_id, item_num, amount,
item_cos
t,
channel_cost, introduce_cost, profit, create_time, `type`, is_valid
id, distribution_order_id, distributor_id, item_id, item_num, amount,
real_amoun
t,
item_cost,
channel_cost, introduce_cost, profit, create_time, `type`, is_valid
</otherwise>
</choose>
from distributor_profit
...
...
@@ -167,14 +167,14 @@
</selectKey>
insert into distributor_profit (distribution_order_id, distributor_id,
item_id, item_num, amount,
item_cost, channel_cost, introduce
_cost,
profit, create_time, `type`
,
is_valid)
real_amount, item_cost, channel
_cost,
introduce_cost, profit, create_time
,
`type`,
is_valid)
values (#{distributionOrderId,jdbcType=VARCHAR}, #{distributorId,jdbcType=BIGINT},
#{itemId,jdbcType=BIGINT}, #{itemNum,jdbcType=INTEGER}, #{amount,jdbcType=BIGINT},
#{
itemCost,jdbcType=BIGINT}, #{channelCost,jdbcType=BIGINT}, #{introduce
Cost,jdbcType=BIGINT},
#{
profit,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=INTEGER
},
#{isValid,jdbcType=BIT})
#{
realAmount,jdbcType=BIGINT}, #{itemCost,jdbcType=BIGINT}, #{channel
Cost,jdbcType=BIGINT},
#{
introduceCost,jdbcType=BIGINT}, #{profit,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP
},
#{
type,jdbcType=INTEGER}, #{
isValid,jdbcType=BIT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.DistributorProfit"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -197,6 +197,9 @@
<if
test=
"amount != null"
>
amount,
</if>
<if
test=
"realAmount != null"
>
real_amount,
</if>
<if
test=
"itemCost != null"
>
item_cost,
</if>
...
...
@@ -235,6 +238,9 @@
<if
test=
"amount != null"
>
#{amount,jdbcType=BIGINT},
</if>
<if
test=
"realAmount != null"
>
#{realAmount,jdbcType=BIGINT},
</if>
<if
test=
"itemCost != null"
>
#{itemCost,jdbcType=BIGINT},
</if>
...
...
@@ -285,6 +291,9 @@
<if
test=
"record.amount != null"
>
amount = #{record.amount,jdbcType=BIGINT},
</if>
<if
test=
"record.realAmount != null"
>
real_amount = #{record.realAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.itemCost != null"
>
item_cost = #{record.itemCost,jdbcType=BIGINT},
</if>
...
...
@@ -319,6 +328,7 @@
item_id = #{record.itemId,jdbcType=BIGINT},
item_num = #{record.itemNum,jdbcType=INTEGER},
amount = #{record.amount,jdbcType=BIGINT},
real_amount = #{record.realAmount,jdbcType=BIGINT},
item_cost = #{record.itemCost,jdbcType=BIGINT},
channel_cost = #{record.channelCost,jdbcType=BIGINT},
introduce_cost = #{record.introduceCost,jdbcType=BIGINT},
...
...
@@ -348,6 +358,9 @@
<if
test=
"amount != null"
>
amount = #{amount,jdbcType=BIGINT},
</if>
<if
test=
"realAmount != null"
>
real_amount = #{realAmount,jdbcType=BIGINT},
</if>
<if
test=
"itemCost != null"
>
item_cost = #{itemCost,jdbcType=BIGINT},
</if>
...
...
@@ -379,6 +392,7 @@
item_id = #{itemId,jdbcType=BIGINT},
item_num = #{itemNum,jdbcType=INTEGER},
amount = #{amount,jdbcType=BIGINT},
real_amount = #{realAmount,jdbcType=BIGINT},
item_cost = #{itemCost,jdbcType=BIGINT},
channel_cost = #{channelCost,jdbcType=BIGINT},
introduce_cost = #{introduceCost,jdbcType=BIGINT},
...
...
@@ -421,8 +435,8 @@
</foreach>
</when>
<otherwise>
id, distribution_order_id, distributor_id, item_id, item_num, amount,
item_cos
t,
channel_cost, introduce_cost, profit, create_time, `type`, is_valid
id, distribution_order_id, distributor_id, item_id, item_num, amount,
real_amoun
t,
item_cost,
channel_cost, introduce_cost, profit, create_time, `type`, is_valid
</otherwise>
</choose>
from distributor_profit
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/UserAccountDetailMapper.xml
View file @
ac94eea4
...
...
@@ -4,7 +4,8 @@
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.distribution.UserAccountDetail"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"order_id"
jdbcType=
"VARCHAR"
property=
"orderId"
/>
<result
column=
"transaction_id"
jdbcType=
"VARCHAR"
property=
"transactionId"
/>
<result
column=
"amount"
jdbcType=
"BIGINT"
property=
"amount"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"fund_type"
jdbcType=
"INTEGER"
property=
"fundType"
/>
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
...
...
@@ -70,7 +71,7 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, user_id,
order_id
, `type`, fund_type, `state`, create_time, update_time
id, user_id,
transaction_id, amount
, `type`, fund_type, `state`, create_time, update_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserAccountDetailExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -99,13 +100,14 @@
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, order_id, `type`, fund_type, `state`, create_time, update_time
id, user_id, transaction_id, amount, `type`, fund_type, `state`, create_time, update_time
</otherwise>
</choose>
from user_account_detail
...
...
@@ -130,13 +132,14 @@
-->
select
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, order_id, `type`, fund_type, `state`, create_time, update_time
id, user_id, transaction_id, amount, `type`, fund_type, `state`, create_time, update_time
</otherwise>
</choose>
from user_account_detail
...
...
@@ -156,12 +159,12 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_account_detail (user_id,
order_id, `type`
,
fund_type, `state`, create_time
,
update_time)
values (#{userId,jdbcType=BIGINT}, #{
orderId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER
},
#{
fundType,jdbcType=INTEGER}, #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP
},
#{updateTime,jdbcType=TIMESTAMP})
insert into user_account_detail (user_id,
transaction_id, amount
,
`type`, fund_type, `state`
,
create_time,
update_time)
values (#{userId,jdbcType=BIGINT}, #{
transactionId,jdbcType=VARCHAR}, #{amount,jdbcType=BIGINT
},
#{
type,jdbcType=INTEGER}, #{fundType,jdbcType=INTEGER}, #{state,jdbcType=INTEGER
},
#{
createTime,jdbcType=TIMESTAMP}, #{
updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserAccountDetail"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -172,8 +175,11 @@
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"orderId != null"
>
order_id,
<if
test=
"transactionId != null"
>
transaction_id,
</if>
<if
test=
"amount != null"
>
amount,
</if>
<if
test=
"type != null"
>
`type`,
...
...
@@ -195,8 +201,11 @@
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"orderId != null"
>
#{orderId,jdbcType=VARCHAR},
<if
test=
"transactionId != null"
>
#{transactionId,jdbcType=VARCHAR},
</if>
<if
test=
"amount != null"
>
#{amount,jdbcType=BIGINT},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
...
...
@@ -230,8 +239,11 @@
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.orderId != null"
>
order_id = #{record.orderId,jdbcType=VARCHAR},
<if
test=
"record.transactionId != null"
>
transaction_id = #{record.transactionId,jdbcType=VARCHAR},
</if>
<if
test=
"record.amount != null"
>
amount = #{record.amount,jdbcType=BIGINT},
</if>
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=INTEGER},
...
...
@@ -257,7 +269,8 @@
update user_account_detail
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
order_id = #{record.orderId,jdbcType=VARCHAR},
transaction_id = #{record.transactionId,jdbcType=VARCHAR},
amount = #{record.amount,jdbcType=BIGINT},
`type` = #{record.type,jdbcType=INTEGER},
fund_type = #{record.fundType,jdbcType=INTEGER},
`state` = #{record.state,jdbcType=INTEGER},
...
...
@@ -273,8 +286,11 @@
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"orderId != null"
>
order_id = #{orderId,jdbcType=VARCHAR},
<if
test=
"transactionId != null"
>
transaction_id = #{transactionId,jdbcType=VARCHAR},
</if>
<if
test=
"amount != null"
>
amount = #{amount,jdbcType=BIGINT},
</if>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=INTEGER},
...
...
@@ -297,7 +313,8 @@
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserAccountDetail"
>
update user_account_detail
set user_id = #{userId,jdbcType=BIGINT},
order_id = #{orderId,jdbcType=VARCHAR},
transaction_id = #{transactionId,jdbcType=VARCHAR},
amount = #{amount,jdbcType=BIGINT},
`type` = #{type,jdbcType=INTEGER},
fund_type = #{fundType,jdbcType=INTEGER},
`state` = #{state,jdbcType=INTEGER},
...
...
@@ -332,13 +349,14 @@
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, order_id, `type`, fund_type, `state`, create_time, update_time
id, user_id, transaction_id, amount, `type`, fund_type, `state`, create_time, update_time
</otherwise>
</choose>
from user_account_detail
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/UserBillMapper.xml
0 → 100644
View file @
ac94eea4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.wwdz.ch.db.mapper.distribution.UserBillMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.distribution.UserBill"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"bill_id"
jdbcType=
"VARCHAR"
property=
"billId"
/>
<result
column=
"account_period"
jdbcType=
"VARCHAR"
property=
"accountPeriod"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"total_entry_amount"
jdbcType=
"BIGINT"
property=
"totalEntryAmount"
/>
<result
column=
"total_wait_entry_amount"
jdbcType=
"BIGINT"
property=
"totalWaitEntryAmount"
/>
<result
column=
"order_entry_amount"
jdbcType=
"BIGINT"
property=
"orderEntryAmount"
/>
<result
column=
"order_wait_entry_amount"
jdbcType=
"BIGINT"
property=
"orderWaitEntryAmount"
/>
<result
column=
"introduce_entry_amount"
jdbcType=
"BIGINT"
property=
"introduceEntryAmount"
/>
<result
column=
"introduce_wait_entry_amount"
jdbcType=
"BIGINT"
property=
"introduceWaitEntryAmount"
/>
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, bill_id, account_period, user_id, total_entry_amount, total_wait_entry_amount,
order_entry_amount, order_wait_entry_amount, introduce_entry_amount, introduce_wait_entry_amount,
`state`
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserBillExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from user_bill
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if
test=
"example.distinct"
>
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, bill_id, account_period, user_id, total_entry_amount, total_wait_entry_amount,
order_entry_amount, order_wait_entry_amount, introduce_entry_amount, introduce_wait_entry_amount,
`state`
</otherwise>
</choose>
from user_bill
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from user_bill
where id = #{id,jdbcType=INTEGER}
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, bill_id, account_period, user_id, total_entry_amount, total_wait_entry_amount,
order_entry_amount, order_wait_entry_amount, introduce_entry_amount, introduce_wait_entry_amount,
`state`
</otherwise>
</choose>
from user_bill
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from user_bill
where id = #{id,jdbcType=INTEGER}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserBillExample"
>
delete from user_bill
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserBill"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_bill (bill_id, account_period, user_id,
total_entry_amount, total_wait_entry_amount, order_entry_amount,
order_wait_entry_amount, introduce_entry_amount,
introduce_wait_entry_amount, `state`)
values (#{billId,jdbcType=VARCHAR}, #{accountPeriod,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
#{totalEntryAmount,jdbcType=BIGINT}, #{totalWaitEntryAmount,jdbcType=BIGINT}, #{orderEntryAmount,jdbcType=BIGINT},
#{orderWaitEntryAmount,jdbcType=BIGINT}, #{introduceEntryAmount,jdbcType=BIGINT},
#{introduceWaitEntryAmount,jdbcType=BIGINT}, #{state,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserBill"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_bill
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"billId != null"
>
bill_id,
</if>
<if
test=
"accountPeriod != null"
>
account_period,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"totalEntryAmount != null"
>
total_entry_amount,
</if>
<if
test=
"totalWaitEntryAmount != null"
>
total_wait_entry_amount,
</if>
<if
test=
"orderEntryAmount != null"
>
order_entry_amount,
</if>
<if
test=
"orderWaitEntryAmount != null"
>
order_wait_entry_amount,
</if>
<if
test=
"introduceEntryAmount != null"
>
introduce_entry_amount,
</if>
<if
test=
"introduceWaitEntryAmount != null"
>
introduce_wait_entry_amount,
</if>
<if
test=
"state != null"
>
`state`,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"billId != null"
>
#{billId,jdbcType=VARCHAR},
</if>
<if
test=
"accountPeriod != null"
>
#{accountPeriod,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"totalEntryAmount != null"
>
#{totalEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"totalWaitEntryAmount != null"
>
#{totalWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"orderEntryAmount != null"
>
#{orderEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"orderWaitEntryAmount != null"
>
#{orderWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"introduceEntryAmount != null"
>
#{introduceEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"introduceWaitEntryAmount != null"
>
#{introduceWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"state != null"
>
#{state,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserBillExample"
resultType=
"java.lang.Long"
>
select count(*) from user_bill
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update user_bill
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=INTEGER},
</if>
<if
test=
"record.billId != null"
>
bill_id = #{record.billId,jdbcType=VARCHAR},
</if>
<if
test=
"record.accountPeriod != null"
>
account_period = #{record.accountPeriod,jdbcType=VARCHAR},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.totalEntryAmount != null"
>
total_entry_amount = #{record.totalEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.totalWaitEntryAmount != null"
>
total_wait_entry_amount = #{record.totalWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.orderEntryAmount != null"
>
order_entry_amount = #{record.orderEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.orderWaitEntryAmount != null"
>
order_wait_entry_amount = #{record.orderWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.introduceEntryAmount != null"
>
introduce_entry_amount = #{record.introduceEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.introduceWaitEntryAmount != null"
>
introduce_wait_entry_amount = #{record.introduceWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.state != null"
>
`state` = #{record.state,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update user_bill
set id = #{record.id,jdbcType=INTEGER},
bill_id = #{record.billId,jdbcType=VARCHAR},
account_period = #{record.accountPeriod,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=BIGINT},
total_entry_amount = #{record.totalEntryAmount,jdbcType=BIGINT},
total_wait_entry_amount = #{record.totalWaitEntryAmount,jdbcType=BIGINT},
order_entry_amount = #{record.orderEntryAmount,jdbcType=BIGINT},
order_wait_entry_amount = #{record.orderWaitEntryAmount,jdbcType=BIGINT},
introduce_entry_amount = #{record.introduceEntryAmount,jdbcType=BIGINT},
introduce_wait_entry_amount = #{record.introduceWaitEntryAmount,jdbcType=BIGINT},
`state` = #{record.state,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserBill"
>
update user_bill
<set>
<if
test=
"billId != null"
>
bill_id = #{billId,jdbcType=VARCHAR},
</if>
<if
test=
"accountPeriod != null"
>
account_period = #{accountPeriod,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"totalEntryAmount != null"
>
total_entry_amount = #{totalEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"totalWaitEntryAmount != null"
>
total_wait_entry_amount = #{totalWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"orderEntryAmount != null"
>
order_entry_amount = #{orderEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"orderWaitEntryAmount != null"
>
order_wait_entry_amount = #{orderWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"introduceEntryAmount != null"
>
introduce_entry_amount = #{introduceEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"introduceWaitEntryAmount != null"
>
introduce_wait_entry_amount = #{introduceWaitEntryAmount,jdbcType=BIGINT},
</if>
<if
test=
"state != null"
>
`state` = #{state,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserBill"
>
update user_bill
set bill_id = #{billId,jdbcType=VARCHAR},
account_period = #{accountPeriod,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=BIGINT},
total_entry_amount = #{totalEntryAmount,jdbcType=BIGINT},
total_wait_entry_amount = #{totalWaitEntryAmount,jdbcType=BIGINT},
order_entry_amount = #{orderEntryAmount,jdbcType=BIGINT},
order_wait_entry_amount = #{orderWaitEntryAmount,jdbcType=BIGINT},
introduce_entry_amount = #{introduceEntryAmount,jdbcType=BIGINT},
introduce_wait_entry_amount = #{introduceWaitEntryAmount,jdbcType=BIGINT},
`state` = #{state,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.UserBillExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from user_bill
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, bill_id, account_period, user_id, total_entry_amount, total_wait_entry_amount,
order_entry_amount, order_wait_entry_amount, introduce_entry_amount, introduce_wait_entry_amount,
`state`
</otherwise>
</choose>
from user_bill
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
ac94eea4
...
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.distribution"
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
user_bank_card
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
distributor_profit
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
ac94eea4
...
...
@@ -243,15 +243,27 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
}
Date
now
=
new
Date
();
AuctionConfig
auctionConfig
=
auctionConfigDao
.
findByItemId
(
dto
.
getItemId
());
//查询用户第一次出价对应的分销商
/*
//查询用户第一次出价对应的分销商
AuctionRecord firstAuctionRecord = auctionRecordDao.findFirstRecord(dto.getItemId(), auctionRecord.getUserId());
String
shareRecordId
=
firstAuctionRecord
.
getShareRecordId
();
// DistributorShareRecord distributorShareRecord = distributorShareRecordDao.findById(shareRecordId);
//SupplierItem supplierItem = supplierItemDao.findById(dto.getItemId());
String shareRecordId = firstAuctionRecord.getShareRecordId();*/
//查询该用户和藏家的介绍人
FollowFansRecordRequestDto
queryFollowFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
queryFollowFansRecordRequestDto
.
setFollowerId
(
auctionConfig
.
getCreatorId
());
queryFollowFansRecordRequestDto
.
setFansId
(
dto
.
getBuyerId
());
FollowFansRecord
followFansRecord
=
followFansRecordDao
.
findOne
(
queryFollowFansRecordRequestDto
);
long
introducerId
;
//没有关注记录,则介绍费算作平台的
if
(
followFansRecord
==
null
)
{
introducerId
=
CommConsts
.
SYSTEM_ACCOUNT
;
}
else
{
//把介绍人作为该订单的分享链接字段的值
introducerId
=
followFansRecord
.
getIntroducerId
();
}
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
distributionOrder
.
setItemId
(
dto
.
getItemId
());
distributionOrder
.
setItemNum
(
1
);
distributionOrder
.
setShareRecordId
(
shareRecordId
);
distributionOrder
.
setShareRecordId
(
String
.
valueOf
(
introducerId
)
);
distributionOrder
.
setDistributionOrderId
(
distributionOrderId
);
distributionOrder
.
setBuyerId
(
auctionRecord
.
getUserId
());
distributionOrder
.
setBuyerOpenid
(
auctionRecord
.
getUserOpenId
());
...
...
@@ -277,17 +289,20 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
channelCostRebate
=
channelCost
.
doubleValue
();
}
logger
.
info
(
"藏家id:{} 生成新拍卖订单,平台服务费比例:{}"
,
auctionConfig
.
getCreatorId
(),
channelCostRebate
);
double
channelServiceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
channelCostRebate
;
distributorProfit
.
setChannelCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
channelServiceCost
)));
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
channelServiceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
-
supplierItem
.
getSupplyPrice
()
-
introduceCost
;
distributorProfit
.
setChannelCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
channelServiceCost
)));
//实际订单到账金额
double
realAmount
=
distributionOrder
.
getAmount
().
doubleValue
()
*
(
1
-
CommConsts
.
WX_COMMISSION_REBATE
);
distributorProfit
.
setIntroduceCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
introduceCost
)));
distributorProfit
.
setDistributionOrderId
(
distributionOrderId
);
...
...
@@ -295,64 +310,17 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
distributorProfit
.
setItemId
(
distributionOrder
.
getItemId
());
distributorProfit
.
setItemNum
(
distributionOrder
.
getItemNum
());
distributorProfit
.
setAmount
(
distributionOrder
.
getAmount
());
distributorProfit
.
setRealAmount
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
realAmount
)));
distributorProfit
.
setItemCost
(
auctionConfig
.
getStartPrice
());
distributorProfit
.
setChannelCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
channelServiceCost
)));
distributorProfit
.
setIntroduceCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
introduceCost
)));
long
profit
=
distributionOrder
.
getAmount
()
-
distributorProfit
.
getChannelCost
()
-
distributorProfit
.
getIntroduceCost
();
distributorProfit
.
setProfit
(
profit
);
//拍卖订单,藏家的利润就是商品设置的供货价
distributorProfit
.
setProfit
(
supplierItem
.
getSupplyPrice
()
);
distributorProfit
.
setCreateTime
(
new
Date
());
distributorProfit
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
AUCTION
.
getCode
());
distributorProfit
.
setIsValid
(
false
);
distributorProfitDao
.
insert
(
distributorProfit
);
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
dto
.
getItemId
());
//去除了分销商的角色,无需计算分销佣金
//查询参与出价的所有用户所对应的分销商,可以平分成交额的3%的利润
/* List<AuctionRecord> auctionRecordList = auctionRecordDao.findByItemId(dto.getItemId());
List<AuctionRecord> filterRecordList = auctionRecordList.stream()
.filter(StringUtil.distinctByKey(AuctionRecord::getDistributorId))
.filter(a -> a.getDistributorId().longValue() != firstAuctionRecord.getDistributorId())
.collect(Collectors.toList());
for (AuctionRecord record : filterRecordList) {
Double allProfit = distributionOrder.getAmount().doubleValue() * 0.03;
int peopleNum = filterRecordList.size();
double averageProfit = allProfit / peopleNum;
DistributorProfit averageProfitRecord = new DistributorProfit();
averageProfitRecord.setDistributionOrderId(distributionOrderId);
averageProfitRecord.setDistributorId(record.getDistributorId());
averageProfitRecord.setItemId(distributionOrder.getItemId());
averageProfitRecord.setItemNum(distributionOrder.getItemNum());
averageProfitRecord.setAmount(distributionOrder.getAmount());
averageProfitRecord.setItemCost(0L);
averageProfitRecord.setProfit((long) Math.floor(averageProfit));
averageProfitRecord.setCreateTime(new Date());
averageProfitRecord.setIsValid(false);
distributorProfitDao.insert(averageProfitRecord);
//通知每一个分享参与出价的分销商
String distributorOpenId = sendMsgService.getOpenIdByUserId(record.getDistributorId());
if (com.xxdxxs.utils.StringUtils.hasLength(distributorOpenId)) {
AuctionOfferNoticeMsg auctionOfferNoticeMsg = new AuctionOfferNoticeMsg();
auctionOfferNoticeMsg.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionRecord.getPrice()));
auctionOfferNoticeMsg.setOpenId(distributorOpenId);
auctionOfferNoticeMsg.setItemId(supplierItem.getId());
auctionOfferNoticeMsg.setItemName(supplierItem.getName());
auctionOfferNoticeMsg.setCurrentPrice(PriceUtil.convertPriceFenToYuan(distributionOrder.getAmount()));
auctionOfferNoticeMsg.setAuctionEndTime(auctionConfig.getRealEndTime());
auctionOfferNoticeMsg.setProfit(PriceUtil.convertDoubleToString(Math.floor(averageProfit)));
Result result = sendMsgService.auctionSuccessForDistributorsMsg(auctionOfferNoticeMsg);
if (!result.getSuccess()) {
String url = wxAppletApi.getUrlLink(AUCTION_MSG_URL, "itemId=" + supplierItem.getId() + "&shareRecordId=");
String msg = "您分享的拍品" + supplierItem.getName() + "已成拍,成交价是" + PriceUtil.convertPriceFenToYuan(distributionOrder.getAmount()) +
"元,您预计获得利润" + PriceUtil.convertDoubleToString(Math.floor(averageProfit)) + "元。请前往"+ url + "查看";
aliSmsSender.sendSms(record.getDistributorId(), msg);
}
} else {
String url = wxAppletApi.getUrlLink(AUCTION_MSG_URL,"itemId=" + supplierItem.getId() + "&shareRecordId=");
String msg = "您分享的拍品" + supplierItem.getName() + "已成拍,成交价是" + PriceUtil.convertPriceFenToYuan(distributionOrder.getAmount()) +
"元,您预计获得利润" + PriceUtil.convertDoubleToString(Math.floor(averageProfit)) + "元。请前往"+ url + "查看";
aliSmsSender.sendSms(record.getDistributorId(), msg);
}
}*/
//把该拍卖配置信息改为已处理, 拍品状态为"中拍未付款"
auctionConfigDao
.
setDeal
(
dto
.
getItemId
(),
AuctionEnum
.
StateEnum
.
GET_NOT_PAY
.
getCode
());
//发送中拍信息给用户
...
...
@@ -442,8 +410,9 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
followFansRecordRequestDto
.
setFansId
(
dto
.
getBuyerId
());
FollowFansRecord
followFansRecord
=
followFansRecordDao
.
findOne
(
followFansRecordRequestDto
);
long
introducerId
;
//没有关注记录,则介绍费算作平台的
if
(
followFansRecord
==
null
)
{
introducerId
=
CommConsts
.
SYSTEM_
SELLER
;
introducerId
=
CommConsts
.
SYSTEM_
ACCOUNT
;
}
else
{
//把介绍人作为该订单的分享链接字段的值
introducerId
=
followFansRecord
.
getIntroducerId
();
...
...
@@ -482,18 +451,21 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
channelCostRebate
=
channelCost
.
doubleValue
();
}
logger
.
info
(
"藏家id:{} 生成新订单,平台服务费比例:{}"
,
supplierItem
.
getCreatorId
(),
channelCostRebate
);
double
channelServiceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
channelCostRebate
;
//平台佣金还要减去微信的服务手续费1%,实际上平台佣金就是订单金额* (平台佣金比例(默认0.15)- 微信手续费(0.01))
double
channelServiceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
(
channelCostRebate
-
CommConsts
.
WX_COMMISSION_REBATE
);
//实际订单到账金额
double
realAmount
=
distributionOrder
.
getAmount
().
doubleValue
()
*
(
1
-
CommConsts
.
WX_COMMISSION_REBATE
);
//介绍人分佣,自己推荐获得的订单无需计算介绍佣金
// double introduceCost = 0;
// if (supplierItem.getCreatorId() != introducerId) {
double
rebate
=
distributorProfitService
.
getIntroduceRebate
(
followFansRecordRequestDto
);
double
introduceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
rebate
;
// }
distributorProfit
.
setDistributionOrderId
(
distributionOrderId
);
distributorProfit
.
setDistributorId
(
distributionOrder
.
getSellerId
());
distributorProfit
.
setItemId
(
distributionOrder
.
getItemId
());
distributorProfit
.
setItemNum
(
distributionOrder
.
getItemNum
());
distributorProfit
.
setAmount
(
distributionOrder
.
getAmount
());
distributorProfit
.
setRealAmount
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
realAmount
)));
distributorProfit
.
setItemCost
(
null
);
distributorProfit
.
setChannelCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
channelServiceCost
)));
distributorProfit
.
setIntroduceCost
(
PriceUtil
.
convertPriceFromStr
(
PriceUtil
.
convertDoubleToString
(
introduceCost
)));
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
ac94eea4
...
...
@@ -533,33 +533,37 @@ public class SupplierItemServiceImpl implements SupplierItemService {
Long
itemId
;
String
shareRecordId
=
dto
.
getShareRecordId
();
CollectionShareRecord
collectionShareRecord
=
null
;
long
introducerId
=
CommConsts
.
SYSTEM_ACCOUNT
;
if
(
StringUtils
.
isEmpty
(
shareRecordId
)
&&
dto
.
getId
()
==
null
)
{
return
Result
.
failed
(
"商品信息为空"
);
}
else
if
(
StringUtils
.
hasLength
(
shareRecordId
)
&&
!
shareRecordId
.
equals
(
CommConsts
.
DEFAULT_SHARE_ID
))
{
collectionShareRecord
=
collectionShareRecordDao
.
findById
(
dto
.
getShareRecordId
());
introducerId
=
collectionShareRecord
.
getSharerId
();
itemId
=
collectionShareRecord
.
getShareTargetId
();
}
else
{
itemId
=
dto
.
getId
();
}
if
(
itemId
==
null
)
{
return
Result
.
failed
(
"没有对应的商品id"
);
}
if
(
collectionShareRecord
.
getItemUserId
().
longValue
()
!=
dto
.
getUserId
().
longValue
())
{
//客态进入别人的藏馆,自动关注
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
followFansRecordRequestDto
.
setFollowerId
(
collectionShareRecord
.
getItemUserId
());
followFansRecordRequestDto
.
setFansId
(
dto
.
getUserId
());
followFansRecordRequestDto
.
setIntroducerId
(
collectionShareRecord
.
getSharerId
());
followFansRecordService
.
follow
(
followFansRecordRequestDto
);
followFansRecordRequestDto
.
setIntroducerId
(
introducerId
);
Result
followResult
=
followFansRecordService
.
follow
(
followFansRecordRequestDto
);
if
(
followResult
.
getSuccess
())
{
logger
.
info
(
"通过藏品详情分享点击,用户id:{} 关注了 用户id为 {}, 介绍人为"
,
dto
.
getUserId
(),
collectionShareRecord
.
getItemUserId
(),
collectionShareRecord
.
getSharerId
());
}
}
else
{
itemId
=
dto
.
getId
(
);
logger
.
info
(
"通过藏品详情分享点击关注用户返回信息 : {}"
+
followResult
.
getErrmsg
()
);
}
if
(
itemId
==
null
)
{
return
Result
.
failed
(
"没有对应的商品id"
);
}
//拍卖专场进入详情页,增加围观次数
specialPerformanceConfigDao
.
addViewNum
(
itemId
);
/* if (StringUtils.hasLength(shareRecordId) && !shareRecordId.equals(CommConsts.DEFAULT_SHARE_ID)) {
if (collectionShareRecord.getItemUserId().longValue() != dto.getUserId().longValue()) {
}
}*/
//查询商品所属专场id
SpecialPerformanceConfigRequestDto
specialPerformanceConfigRequestDto
=
new
SpecialPerformanceConfigRequestDto
();
specialPerformanceConfigRequestDto
.
setItemId
(
itemId
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/UserAccountDetailServiceImpl.java
View file @
ac94eea4
package
com.wwdz.ch.wx.impl.distribution
;
import
com.wwdz.ch.core.consts.BillEnum
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.distribution.UserAccountDetailDao
;
import
com.wwdz.ch.db.domain.distribution.DistributionOrder
;
import
com.wwdz.ch.db.domain.distribution.DistributorProfit
;
import
com.wwdz.ch.db.domain.distribution.UserAccountDetail
;
import
com.wwdz.ch.db.dto.request.distribution.UserAccountDetailRequestDto
;
import
com.wwdz.ch.wx.service.distribution.UserAccountDetailService
;
import
com.xxdxxs.utils.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -11,6 +17,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
@Service
public
class
UserAccountDetailServiceImpl
implements
UserAccountDetailService
{
...
...
@@ -19,10 +27,63 @@ public class UserAccountDetailServiceImpl implements UserAccountDetailService {
@Autowired
UserAccountDetailDao
userAccountDetailDao
;
@Transactional
(
propagation
=
Propagation
.
REQUIRED
)
@Override
public
Result
create
(
UserAccountDetailRequestDto
dto
)
throws
Exception
{
public
Result
create
(
DistributionOrder
distributionOrder
,
DistributorProfit
distributorProfit
)
throws
Exception
{
try
{
//订单金额
long
orderAmount
=
distributionOrder
.
getAmount
();
//平台佣金
long
channelCost
=
distributorProfit
.
getChannelCost
();
//介绍佣金
long
introduceCost
=
distributorProfit
.
getIntroduceCost
();
//卖家实际收益
long
sellerProfitAmount
=
orderAmount
-
channelCost
-
introduceCost
;
//记录卖家的收益
UserAccountDetail
userAccountDetail
=
new
UserAccountDetail
();
userAccountDetail
.
setUserId
(
distributionOrder
.
getSellerId
());
userAccountDetail
.
setTransactionId
(
distributionOrder
.
getDistributionOrderId
());
userAccountDetail
.
setAmount
(
sellerProfitAmount
);
userAccountDetail
.
setType
(
BillEnum
.
AccountDetailTypeEnum
.
ORDER
.
getCode
());
userAccountDetail
.
setFundType
(
BillEnum
.
FundTypeEnum
.
INCOME
.
getCode
());
//创建订单时状态是无效,等买家付款后变为待入账,订单完成变成已入账
userAccountDetail
.
setState
(
BillEnum
.
AccountDetailStateEnum
.
INVALID
.
getCode
());
userAccountDetail
.
setCreateTime
(
distributionOrder
.
getCreateTime
());
userAccountDetailDao
.
insert
(
userAccountDetail
);
//记录平台佣金
UserAccountDetail
channelAccountDetail
=
new
UserAccountDetail
();
channelAccountDetail
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT
);
channelAccountDetail
.
setTransactionId
(
distributionOrder
.
getDistributionOrderId
());
channelAccountDetail
.
setAmount
(
channelCost
);
channelAccountDetail
.
setType
(
BillEnum
.
AccountDetailTypeEnum
.
CHANNEL
.
getCode
());
channelAccountDetail
.
setFundType
(
BillEnum
.
FundTypeEnum
.
INCOME
.
getCode
());
//创建订单时状态是无效,等买家付款后变为待入账,订单完成变成已入账
channelAccountDetail
.
setState
(
BillEnum
.
AccountDetailStateEnum
.
INVALID
.
getCode
());
channelAccountDetail
.
setCreateTime
(
distributionOrder
.
getCreateTime
());
userAccountDetailDao
.
insert
(
channelAccountDetail
);
//记录介绍佣金,判断介绍人是平台还是用户
UserAccountDetail
introduceAccountDetail
=
new
UserAccountDetail
();
if
(
StringUtils
.
isEmpty
(
distributionOrder
.
getShareRecordId
())
||
CommConsts
.
DEFAULT_SHARE_ID
.
equals
(
distributionOrder
.
getShareRecordId
()))
{
introduceAccountDetail
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT
);
}
else
{
}
introduceAccountDetail
.
setTransactionId
(
distributionOrder
.
getDistributionOrderId
());
introduceAccountDetail
.
setAmount
(
channelCost
);
introduceAccountDetail
.
setType
(
BillEnum
.
AccountDetailTypeEnum
.
CHANNEL
.
getCode
());
introduceAccountDetail
.
setFundType
(
BillEnum
.
FundTypeEnum
.
INCOME
.
getCode
());
//创建订单时状态是无效,等买家付款后变为待入账,订单完成变成已入账
introduceAccountDetail
.
setState
(
BillEnum
.
AccountDetailStateEnum
.
INVALID
.
getCode
());
introduceAccountDetail
.
setCreateTime
(
distributionOrder
.
getCreateTime
());
userAccountDetailDao
.
insert
(
introduceAccountDetail
);
return
Result
.
success
();
...
...
@@ -31,4 +92,7 @@ public class UserAccountDetailServiceImpl implements UserAccountDetailService {
throw
new
Exception
(
e
);
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/UserAccountDetailService.java
View file @
ac94eea4
package
com.wwdz.ch.wx.service.distribution
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.domain.distribution.DistributionOrder
;
import
com.wwdz.ch.db.domain.distribution.DistributorProfit
;
import
com.wwdz.ch.db.dto.request.distribution.UserAccountDetailRequestDto
;
public
interface
UserAccountDetailService
{
...
...
@@ -10,5 +12,5 @@ public interface UserAccountDetailService {
* @param dto
* @return
*/
Result
create
(
UserAccountDetailRequestDto
dto
)
throws
Exception
;
Result
create
(
DistributionOrder
distributionOrder
,
DistributorProfit
distributorProfit
)
throws
Exception
;
}
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