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
431b5261
Commit
431b5261
authored
Dec 21, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取结款信息
parent
a888a806
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
261 additions
and
21 deletions
+261
-21
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ConsignSaleController.java
...a/com/wwdz/ch/admin/controller/ConsignSaleController.java
+14
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
...n/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
+54
-5
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/ConsignSaleService.java
...in/java/com/wwdz/ch/admin/service/ConsignSaleService.java
+7
-0
ch-core/src/main/java/com/wwdz/ch/core/util/PriceUtil.java
ch-core/src/main/java/com/wwdz/ch/core/util/PriceUtil.java
+13
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSale.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSale.java
+10
-1
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSaleExample.java
...c/main/java/com/wwdz/ch/db/domain/ConsignSaleExample.java
+132
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ConsignSaleMapper.xml
...ain/resources/com/wwdz/ch/db/mapper/ConsignSaleMapper.xml
+31
-15
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ConsignSaleController.java
View file @
431b5261
...
@@ -154,4 +154,18 @@ public class ConsignSaleController {
...
@@ -154,4 +154,18 @@ public class ConsignSaleController {
}
}
return
consignSaleService
.
cancel
(
dto
);
return
consignSaleService
.
cancel
(
dto
);
}
}
@ApiOperation
(
value
=
"获取结款信息"
)
@PostMapping
(
"/getSettlementInfo"
)
public
Result
getSettlementInfo
(
@RequestBody
ConsignSaleRecordRequestDto
dto
)
{
logger
.
info
(
"【请求开始】获取结款信息,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
getSettlementInfo
(
dto
);
}
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
View file @
431b5261
...
@@ -15,6 +15,7 @@ import com.wwdz.ch.core.type.PageSearchResult;
...
@@ -15,6 +15,7 @@ import com.wwdz.ch.core.type.PageSearchResult;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.CacheUtil
;
import
com.wwdz.ch.core.util.CacheUtil
;
import
com.wwdz.ch.core.util.MediaUtil
;
import
com.wwdz.ch.core.util.MediaUtil
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.db.dao.*
;
import
com.wwdz.ch.db.dao.*
;
import
com.wwdz.ch.db.domain.*
;
import
com.wwdz.ch.db.domain.*
;
import
com.wwdz.ch.db.dao.ConsignSaleDao
;
import
com.wwdz.ch.db.dao.ConsignSaleDao
;
...
@@ -34,10 +35,10 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -34,10 +35,10 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.
util.Date
;
import
java.
lang.System
;
import
java.
util.List
;
import
java.
math.BigDecimal
;
import
java.util.
Map
;
import
java.util.
*
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -178,6 +179,12 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
...
@@ -178,6 +179,12 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
public
Result
imgValuate
(
ConsignSaleRequestDto
dto
)
{
public
Result
imgValuate
(
ConsignSaleRequestDto
dto
)
{
try
{
try
{
//估价完状态不变等待用户确认之后变更状态
//估价完状态不变等待用户确认之后变更状态
ConsignSale
consignSale
=
new
ConsignSale
();
consignSale
.
setImgValuation
(
dto
.
getImgValuation
());
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSaleDao
.
update
(
consignSale
);
//插入操作记录,图文估价
//插入操作记录,图文估价
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
...
@@ -258,6 +265,13 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
...
@@ -258,6 +265,13 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
public
Result
identify
(
ConsignSaleRequestDto
dto
)
{
public
Result
identify
(
ConsignSaleRequestDto
dto
)
{
try
{
try
{
//鉴定完状态不变等待用户确认之后变更状态
//鉴定完状态不变等待用户确认之后变更状态
ConsignSale
consignSale
=
new
ConsignSale
();
//价格*100
consignSale
.
setValuation
(
dto
.
getValuation
()
*
100
);
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSaleDao
.
update
(
consignSale
);
//插入操作记录,平台鉴定并估价
//插入操作记录,平台鉴定并估价
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
...
@@ -291,20 +305,29 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
...
@@ -291,20 +305,29 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
return
Result
.
failed
();
return
Result
.
failed
();
}
}
@Transactional
@Transactional
@Override
@Override
public
Result
finishSale
(
ConsignSaleRequestDto
dto
)
{
public
Result
finishSale
(
ConsignSaleRequestDto
dto
)
{
try
{
try
{
ConsignSale
consignSaleInfo
=
consignSaleDao
.
findById
(
dto
.
getSaleId
());
ConsignSale
consignSaleInfo
=
consignSaleDao
.
findById
(
dto
.
getSaleId
());
long
itemId
=
consignSaleInfo
.
getItemId
();
long
itemId
=
consignSaleInfo
.
getItemId
();
//建议寄售价
int
valuationPrice
=
consignSaleInfo
.
getValuation
();
//给用户结算金额,已经是乘以100了,结款金额-平台收取10%的手续费
int
settleAmount
=
(
int
)
(
valuationPrice
*
0.9
);
ConsignSale
consignSale
=
new
ConsignSale
();
ConsignSale
consignSale
=
new
ConsignSale
();
consignSale
.
setDealPrice
(
dto
.
getDealPrice
());
//价格 * 100
consignSale
.
setDealPrice
(
dto
.
getDealPrice
()
*
100
);
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSale
.
setCustomState
(
ConsignSaleEnum
.
SaleForUserStateEnum
.
PRE_PAY
.
getCode
());
consignSale
.
setCustomState
(
ConsignSaleEnum
.
SaleForUserStateEnum
.
PRE_PAY
.
getCode
());
consignSale
.
setSystemState
(
ConsignSaleEnum
.
SaleForSysStateEnum
.
PRE_PAY
.
getCode
());
consignSale
.
setSystemState
(
ConsignSaleEnum
.
SaleForSysStateEnum
.
PRE_PAY
.
getCode
());
consignSale
.
setSettleAmount
(
settleAmount
);
consignSaleDao
.
update
(
consignSale
);
consignSaleDao
.
update
(
consignSale
);
//卖出后商品下架
//卖出后商品下架
itemDao
.
updateOnSale
(
itemId
,
ItemStateEnum
.
SALED
.
getCode
());
itemDao
.
updateOnSale
(
itemId
,
ItemStateEnum
.
SALED
.
getCode
());
//插入操作记录,货品售出待结款
//插入操作记录,货品售出待结款
...
@@ -439,4 +462,30 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
...
@@ -439,4 +462,30 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
}
}
return
Result
.
failed
();
return
Result
.
failed
();
}
}
@Override
public
Result
getSettlementInfo
(
ConsignSaleRecordRequestDto
dto
)
{
try
{
ConsignSale
consignSale
=
consignSaleDao
.
findById
(
dto
.
getSaleId
());
if
(
consignSale
==
null
)
{
return
Result
.
failed
(
"寄售单不存在"
);
}
if
(
consignSale
.
getSystemState
()
!=
ConsignSaleEnum
.
SaleForSysStateEnum
.
PRE_PAY
.
getCode
())
{
return
Result
.
failed
(
"寄售单状态不是待结款,无法查询结款信息"
);
}
long
userId
=
consignSale
.
getUserId
();
User
user
=
userDao
.
queryById
(
userId
);
int
settleAmount
=
consignSale
.
getSettleAmount
();
String
amount
=
PriceUtil
.
convertPriceByTwo
(
settleAmount
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
user
.
getNickname
());
map
.
put
(
"phone"
,
user
.
getMobile
());
map
.
put
(
"settleAmount"
,
amount
);
return
Result
.
success
(
map
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询结款信息error : {}"
,
e
);
}
return
Result
.
failed
();
}
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/ConsignSaleService.java
View file @
431b5261
...
@@ -62,4 +62,11 @@ public interface ConsignSaleService {
...
@@ -62,4 +62,11 @@ public interface ConsignSaleService {
* @return
* @return
*/
*/
Result
cancel
(
ConsignSaleRecordRequestDto
dto
);
Result
cancel
(
ConsignSaleRecordRequestDto
dto
);
/**
* 获取结款信息
* @param dto
* @return
*/
Result
getSettlementInfo
(
ConsignSaleRecordRequestDto
dto
);
}
}
ch-core/src/main/java/com/wwdz/ch/core/util/PriceUtil.java
View file @
431b5261
package
com.wwdz.ch.core.util
;
package
com.wwdz.ch.core.util
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
public
class
PriceUtil
{
public
class
PriceUtil
{
...
@@ -9,4 +10,16 @@ public class PriceUtil {
...
@@ -9,4 +10,16 @@ public class PriceUtil {
price
=
price
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
price
=
price
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
return
price
.
toString
();
return
price
.
toString
();
}
}
public
static
String
convertPriceByTwo
(
int
price
){
double
num
=
(
double
)
price
/
100
;
BigDecimal
bigDecimal
=
new
BigDecimal
(
String
.
valueOf
(
num
));
DecimalFormat
df
=
new
DecimalFormat
(
"#0.00"
);
return
df
.
format
(
bigDecimal
);
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
convertPriceByTwo
(
18900
));
}
}
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSale.java
View file @
431b5261
...
@@ -10,7 +10,7 @@ import lombok.Data;
...
@@ -10,7 +10,7 @@ import lombok.Data;
/**
/**
* @author shiyu
* @author shiyu
* @date 2023/12/
18
* @date 2023/12/
21
*/
*/
@Data
@Data
public
class
ConsignSale
implements
Entity
{
public
class
ConsignSale
implements
Entity
{
...
@@ -56,6 +56,11 @@ public class ConsignSale implements Entity {
...
@@ -56,6 +56,11 @@ public class ConsignSale implements Entity {
*/
*/
private
Integer
dealPrice
;
private
Integer
dealPrice
;
/**
* 结算价格
*/
private
Integer
settleAmount
;
/**
/**
* 客户端状态
* 客户端状态
*/
*/
...
@@ -108,6 +113,7 @@ public class ConsignSale implements Entity {
...
@@ -108,6 +113,7 @@ public class ConsignSale implements Entity {
sb
.
append
(
", imgValuation="
).
append
(
imgValuation
);
sb
.
append
(
", imgValuation="
).
append
(
imgValuation
);
sb
.
append
(
", valuation="
).
append
(
valuation
);
sb
.
append
(
", valuation="
).
append
(
valuation
);
sb
.
append
(
", dealPrice="
).
append
(
dealPrice
);
sb
.
append
(
", dealPrice="
).
append
(
dealPrice
);
sb
.
append
(
", settleAmount="
).
append
(
settleAmount
);
sb
.
append
(
", customState="
).
append
(
customState
);
sb
.
append
(
", customState="
).
append
(
customState
);
sb
.
append
(
", systemState="
).
append
(
systemState
);
sb
.
append
(
", systemState="
).
append
(
systemState
);
sb
.
append
(
", logisticsCode="
).
append
(
logisticsCode
);
sb
.
append
(
", logisticsCode="
).
append
(
logisticsCode
);
...
@@ -141,6 +147,7 @@ public class ConsignSale implements Entity {
...
@@ -141,6 +147,7 @@ public class ConsignSale implements Entity {
&&
(
this
.
getImgValuation
()
==
null
?
other
.
getImgValuation
()
==
null
:
this
.
getImgValuation
().
equals
(
other
.
getImgValuation
()))
&&
(
this
.
getImgValuation
()
==
null
?
other
.
getImgValuation
()
==
null
:
this
.
getImgValuation
().
equals
(
other
.
getImgValuation
()))
&&
(
this
.
getValuation
()
==
null
?
other
.
getValuation
()
==
null
:
this
.
getValuation
().
equals
(
other
.
getValuation
()))
&&
(
this
.
getValuation
()
==
null
?
other
.
getValuation
()
==
null
:
this
.
getValuation
().
equals
(
other
.
getValuation
()))
&&
(
this
.
getDealPrice
()
==
null
?
other
.
getDealPrice
()
==
null
:
this
.
getDealPrice
().
equals
(
other
.
getDealPrice
()))
&&
(
this
.
getDealPrice
()
==
null
?
other
.
getDealPrice
()
==
null
:
this
.
getDealPrice
().
equals
(
other
.
getDealPrice
()))
&&
(
this
.
getSettleAmount
()
==
null
?
other
.
getSettleAmount
()
==
null
:
this
.
getSettleAmount
().
equals
(
other
.
getSettleAmount
()))
&&
(
this
.
getCustomState
()
==
null
?
other
.
getCustomState
()
==
null
:
this
.
getCustomState
().
equals
(
other
.
getCustomState
()))
&&
(
this
.
getCustomState
()
==
null
?
other
.
getCustomState
()
==
null
:
this
.
getCustomState
().
equals
(
other
.
getCustomState
()))
&&
(
this
.
getSystemState
()
==
null
?
other
.
getSystemState
()
==
null
:
this
.
getSystemState
().
equals
(
other
.
getSystemState
()))
&&
(
this
.
getSystemState
()
==
null
?
other
.
getSystemState
()
==
null
:
this
.
getSystemState
().
equals
(
other
.
getSystemState
()))
&&
(
this
.
getLogisticsCode
()
==
null
?
other
.
getLogisticsCode
()
==
null
:
this
.
getLogisticsCode
().
equals
(
other
.
getLogisticsCode
()))
&&
(
this
.
getLogisticsCode
()
==
null
?
other
.
getLogisticsCode
()
==
null
:
this
.
getLogisticsCode
().
equals
(
other
.
getLogisticsCode
()))
...
@@ -163,6 +170,7 @@ public class ConsignSale implements Entity {
...
@@ -163,6 +170,7 @@ public class ConsignSale implements Entity {
result
=
prime
*
result
+
((
getImgValuation
()
==
null
)
?
0
:
getImgValuation
().
hashCode
());
result
=
prime
*
result
+
((
getImgValuation
()
==
null
)
?
0
:
getImgValuation
().
hashCode
());
result
=
prime
*
result
+
((
getValuation
()
==
null
)
?
0
:
getValuation
().
hashCode
());
result
=
prime
*
result
+
((
getValuation
()
==
null
)
?
0
:
getValuation
().
hashCode
());
result
=
prime
*
result
+
((
getDealPrice
()
==
null
)
?
0
:
getDealPrice
().
hashCode
());
result
=
prime
*
result
+
((
getDealPrice
()
==
null
)
?
0
:
getDealPrice
().
hashCode
());
result
=
prime
*
result
+
((
getSettleAmount
()
==
null
)
?
0
:
getSettleAmount
().
hashCode
());
result
=
prime
*
result
+
((
getCustomState
()
==
null
)
?
0
:
getCustomState
().
hashCode
());
result
=
prime
*
result
+
((
getCustomState
()
==
null
)
?
0
:
getCustomState
().
hashCode
());
result
=
prime
*
result
+
((
getSystemState
()
==
null
)
?
0
:
getSystemState
().
hashCode
());
result
=
prime
*
result
+
((
getSystemState
()
==
null
)
?
0
:
getSystemState
().
hashCode
());
result
=
prime
*
result
+
((
getLogisticsCode
()
==
null
)
?
0
:
getLogisticsCode
().
hashCode
());
result
=
prime
*
result
+
((
getLogisticsCode
()
==
null
)
?
0
:
getLogisticsCode
().
hashCode
());
...
@@ -190,6 +198,7 @@ public class ConsignSale implements Entity {
...
@@ -190,6 +198,7 @@ public class ConsignSale implements Entity {
imgValuation
(
"img_valuation"
,
"imgValuation"
,
"VARCHAR"
,
false
),
imgValuation
(
"img_valuation"
,
"imgValuation"
,
"VARCHAR"
,
false
),
valuation
(
"valuation"
,
"valuation"
,
"INTEGER"
,
false
),
valuation
(
"valuation"
,
"valuation"
,
"INTEGER"
,
false
),
dealPrice
(
"deal_price"
,
"dealPrice"
,
"INTEGER"
,
false
),
dealPrice
(
"deal_price"
,
"dealPrice"
,
"INTEGER"
,
false
),
settleAmount
(
"settle_amount"
,
"settleAmount"
,
"INTEGER"
,
false
),
customState
(
"custom_state"
,
"customState"
,
"INTEGER"
,
false
),
customState
(
"custom_state"
,
"customState"
,
"INTEGER"
,
false
),
systemState
(
"system_state"
,
"systemState"
,
"INTEGER"
,
false
),
systemState
(
"system_state"
,
"systemState"
,
"INTEGER"
,
false
),
logisticsCode
(
"logistics_code"
,
"logisticsCode"
,
"VARCHAR"
,
false
),
logisticsCode
(
"logistics_code"
,
"logisticsCode"
,
"VARCHAR"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSaleExample.java
View file @
431b5261
...
@@ -1356,6 +1356,138 @@ public class ConsignSaleExample {
...
@@ -1356,6 +1356,138 @@ public class ConsignSaleExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andSettleAmountIsNull
()
{
addCriterion
(
"settle_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountIsNotNull
()
{
addCriterion
(
"settle_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountEqualTo
(
Integer
value
)
{
addCriterion
(
"settle_amount ="
,
value
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSettleAmountEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"settle_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountNotEqualTo
(
Integer
value
)
{
addCriterion
(
"settle_amount <>"
,
value
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSettleAmountNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"settle_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountGreaterThan
(
Integer
value
)
{
addCriterion
(
"settle_amount >"
,
value
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSettleAmountGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"settle_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"settle_amount >="
,
value
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSettleAmountGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"settle_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountLessThan
(
Integer
value
)
{
addCriterion
(
"settle_amount <"
,
value
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSettleAmountLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"settle_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"settle_amount <="
,
value
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSettleAmountLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"settle_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"settle_amount in"
,
values
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"settle_amount not in"
,
values
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"settle_amount between"
,
value1
,
value2
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSettleAmountNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"settle_amount not between"
,
value1
,
value2
,
"settleAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateIsNull
()
{
public
Criteria
andCustomStateIsNull
()
{
addCriterion
(
"custom_state is null"
);
addCriterion
(
"custom_state is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ConsignSaleMapper.xml
View file @
431b5261
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<result
column=
"img_valuation"
jdbcType=
"VARCHAR"
property=
"imgValuation"
/>
<result
column=
"img_valuation"
jdbcType=
"VARCHAR"
property=
"imgValuation"
/>
<result
column=
"valuation"
jdbcType=
"INTEGER"
property=
"valuation"
/>
<result
column=
"valuation"
jdbcType=
"INTEGER"
property=
"valuation"
/>
<result
column=
"deal_price"
jdbcType=
"INTEGER"
property=
"dealPrice"
/>
<result
column=
"deal_price"
jdbcType=
"INTEGER"
property=
"dealPrice"
/>
<result
column=
"settle_amount"
jdbcType=
"INTEGER"
property=
"settleAmount"
/>
<result
column=
"custom_state"
jdbcType=
"INTEGER"
property=
"customState"
/>
<result
column=
"custom_state"
jdbcType=
"INTEGER"
property=
"customState"
/>
<result
column=
"system_state"
jdbcType=
"INTEGER"
property=
"systemState"
/>
<result
column=
"system_state"
jdbcType=
"INTEGER"
property=
"systemState"
/>
<result
column=
"logistics_code"
jdbcType=
"VARCHAR"
property=
"logisticsCode"
/>
<result
column=
"logistics_code"
jdbcType=
"VARCHAR"
property=
"logisticsCode"
/>
...
@@ -79,7 +80,8 @@
...
@@ -79,7 +80,8 @@
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, logistics_code, waybill, credential, create_time, update_time
settle_amount, custom_state, system_state, logistics_code, waybill, credential, create_time,
update_time
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -115,8 +117,8 @@
...
@@ -115,8 +117,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, logistics_code, waybill, credential, create_time, update_time
settle_amount, custom_state, system_state, logistics_code, waybill, credential,
create_time, update_time
</otherwise>
</otherwise>
</choose>
</choose>
from consign_sale
from consign_sale
...
@@ -148,8 +150,8 @@
...
@@ -148,8 +150,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, logistics_code, waybill, credential, create_time, update_time
settle_amount, custom_state, system_state, logistics_code, waybill, credential,
create_time, update_time
</otherwise>
</otherwise>
</choose>
</choose>
from consign_sale
from consign_sale
...
@@ -171,16 +173,16 @@
...
@@ -171,16 +173,16 @@
</selectKey>
</selectKey>
insert into consign_sale (sale_id, item_id, user_id,
insert into consign_sale (sale_id, item_id, user_id,
sale_time, user_price, img_valuation,
sale_time, user_price, img_valuation,
valuation, deal_price,
custom_state
,
valuation, deal_price,
settle_amount
,
system_state, logistics_code, waybill
,
custom_state, system_state, logistics_code
,
credential, create_time, update_time
waybill, credential, create_time,
)
update_time
)
values (#{saleId,jdbcType=VARCHAR}, #{itemId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
values (#{saleId,jdbcType=VARCHAR}, #{itemId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
#{saleTime,jdbcType=TIMESTAMP}, #{userPrice,jdbcType=INTEGER}, #{imgValuation,jdbcType=VARCHAR},
#{saleTime,jdbcType=TIMESTAMP}, #{userPrice,jdbcType=INTEGER}, #{imgValuation,jdbcType=VARCHAR},
#{valuation,jdbcType=INTEGER}, #{dealPrice,jdbcType=INTEGER}, #{
customState
,jdbcType=INTEGER},
#{valuation,jdbcType=INTEGER}, #{dealPrice,jdbcType=INTEGER}, #{
settleAmount
,jdbcType=INTEGER},
#{
systemState,jdbcType=INTEGER}, #{logisticsCode,jdbcType=VARCHAR}, #{waybill
,jdbcType=VARCHAR},
#{
customState,jdbcType=INTEGER}, #{systemState,jdbcType=INTEGER}, #{logisticsCode
,jdbcType=VARCHAR},
#{
credential,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
#{
waybill,jdbcType=VARCHAR}, #{credential,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
)
#{updateTime,jdbcType=TIMESTAMP}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.ConsignSale"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.ConsignSale"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
...
@@ -212,6 +214,9 @@
...
@@ -212,6 +214,9 @@
<if
test=
"dealPrice != null"
>
<if
test=
"dealPrice != null"
>
deal_price,
deal_price,
</if>
</if>
<if
test=
"settleAmount != null"
>
settle_amount,
</if>
<if
test=
"customState != null"
>
<if
test=
"customState != null"
>
custom_state,
custom_state,
</if>
</if>
...
@@ -259,6 +264,9 @@
...
@@ -259,6 +264,9 @@
<if
test=
"dealPrice != null"
>
<if
test=
"dealPrice != null"
>
#{dealPrice,jdbcType=INTEGER},
#{dealPrice,jdbcType=INTEGER},
</if>
</if>
<if
test=
"settleAmount != null"
>
#{settleAmount,jdbcType=INTEGER},
</if>
<if
test=
"customState != null"
>
<if
test=
"customState != null"
>
#{customState,jdbcType=INTEGER},
#{customState,jdbcType=INTEGER},
</if>
</if>
...
@@ -318,6 +326,9 @@
...
@@ -318,6 +326,9 @@
<if
test=
"record.dealPrice != null"
>
<if
test=
"record.dealPrice != null"
>
deal_price = #{record.dealPrice,jdbcType=INTEGER},
deal_price = #{record.dealPrice,jdbcType=INTEGER},
</if>
</if>
<if
test=
"record.settleAmount != null"
>
settle_amount = #{record.settleAmount,jdbcType=INTEGER},
</if>
<if
test=
"record.customState != null"
>
<if
test=
"record.customState != null"
>
custom_state = #{record.customState,jdbcType=INTEGER},
custom_state = #{record.customState,jdbcType=INTEGER},
</if>
</if>
...
@@ -355,6 +366,7 @@
...
@@ -355,6 +366,7 @@
img_valuation = #{record.imgValuation,jdbcType=VARCHAR},
img_valuation = #{record.imgValuation,jdbcType=VARCHAR},
valuation = #{record.valuation,jdbcType=INTEGER},
valuation = #{record.valuation,jdbcType=INTEGER},
deal_price = #{record.dealPrice,jdbcType=INTEGER},
deal_price = #{record.dealPrice,jdbcType=INTEGER},
settle_amount = #{record.settleAmount,jdbcType=INTEGER},
custom_state = #{record.customState,jdbcType=INTEGER},
custom_state = #{record.customState,jdbcType=INTEGER},
system_state = #{record.systemState,jdbcType=INTEGER},
system_state = #{record.systemState,jdbcType=INTEGER},
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
...
@@ -393,6 +405,9 @@
...
@@ -393,6 +405,9 @@
<if
test=
"dealPrice != null"
>
<if
test=
"dealPrice != null"
>
deal_price = #{dealPrice,jdbcType=INTEGER},
deal_price = #{dealPrice,jdbcType=INTEGER},
</if>
</if>
<if
test=
"settleAmount != null"
>
settle_amount = #{settleAmount,jdbcType=INTEGER},
</if>
<if
test=
"customState != null"
>
<if
test=
"customState != null"
>
custom_state = #{customState,jdbcType=INTEGER},
custom_state = #{customState,jdbcType=INTEGER},
</if>
</if>
...
@@ -427,6 +442,7 @@
...
@@ -427,6 +442,7 @@
img_valuation = #{imgValuation,jdbcType=VARCHAR},
img_valuation = #{imgValuation,jdbcType=VARCHAR},
valuation = #{valuation,jdbcType=INTEGER},
valuation = #{valuation,jdbcType=INTEGER},
deal_price = #{dealPrice,jdbcType=INTEGER},
deal_price = #{dealPrice,jdbcType=INTEGER},
settle_amount = #{settleAmount,jdbcType=INTEGER},
custom_state = #{customState,jdbcType=INTEGER},
custom_state = #{customState,jdbcType=INTEGER},
system_state = #{systemState,jdbcType=INTEGER},
system_state = #{systemState,jdbcType=INTEGER},
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
...
@@ -470,8 +486,8 @@
...
@@ -470,8 +486,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, logistics_code, waybill, credential, create_time, update_time
settle_amount, custom_state, system_state, logistics_code, waybill, credential,
create_time, update_time
</otherwise>
</otherwise>
</choose>
</choose>
from consign_sale
from consign_sale
...
...
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