Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高宇
wms_api
Commits
86c923b0
Commit
86c923b0
authored
Dec 24, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改退款
parent
a5c0dddf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
CustRecharge.java
...ava/org/rcisoft/bus/custrecharge/entity/CustRecharge.java
+5
-0
CustRechargeServiceImpl.java
...us/custrecharge/service/impl/CustRechargeServiceImpl.java
+8
-1
StoreGoodsApply.java
...g/rcisoft/bus/storegoodsapply/entity/StoreGoodsApply.java
+2
-0
No files found.
src/main/java/org/rcisoft/bus/custrecharge/entity/CustRecharge.java
View file @
86c923b0
...
@@ -127,5 +127,10 @@ public class CustRecharge extends CyIdIncreEntity<CustRecharge> {
...
@@ -127,5 +127,10 @@ public class CustRecharge extends CyIdIncreEntity<CustRecharge> {
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
storeName
;
private
String
storeName
;
/**
* 是否为退款
*/
private
String
isReturn
;
}
}
src/main/java/org/rcisoft/bus/custrecharge/service/impl/CustRechargeServiceImpl.java
View file @
86c923b0
...
@@ -28,6 +28,7 @@ import org.rcisoft.core.model.CyPageInfo;
...
@@ -28,6 +28,7 @@ import org.rcisoft.core.model.CyPageInfo;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -58,12 +59,18 @@ public class CustRechargeServiceImpl extends ServiceImpl<CustRechargeRepository,
...
@@ -58,12 +59,18 @@ public class CustRechargeServiceImpl extends ServiceImpl<CustRechargeRepository,
public
CyPersistModel
persist
(
CustRecharge
custRecharge
){
public
CyPersistModel
persist
(
CustRecharge
custRecharge
){
custRecharge
.
setStoreId
(
CyUserUtil
.
getAuthenDept
());
custRecharge
.
setStoreId
(
CyUserUtil
.
getAuthenDept
());
if
(
custRecharge
.
getOrderNumber
()
!=
null
){
if
(
custRecharge
.
getOrderNumber
()
!=
null
&&
custRecharge
.
getIsReturn
()
==
null
){
//根据id修改余额
//根据id修改余额
CustInfo
custInfo
=
custInfoServiceImpl
.
findById
(
custRecharge
.
getCustomerId
());
CustInfo
custInfo
=
custInfoServiceImpl
.
findById
(
custRecharge
.
getCustomerId
());
BigDecimal
newBalance
=
custInfo
.
getCustomerBalance
().
subtract
(
custRecharge
.
getConsumptionAmount
());
BigDecimal
newBalance
=
custInfo
.
getCustomerBalance
().
subtract
(
custRecharge
.
getConsumptionAmount
());
custInfo
.
setCustomerBalance
(
newBalance
);
custInfo
.
setCustomerBalance
(
newBalance
);
custInfoServiceImpl
.
merge
(
custInfo
);
custInfoServiceImpl
.
merge
(
custInfo
);
}
else
if
(
Objects
.
equals
(
custRecharge
.
getIsReturn
(),
"1"
)){
CustInfo
custInfo
=
custInfoServiceImpl
.
findById
(
custRecharge
.
getCustomerId
());
BigDecimal
newBalance
=
custInfo
.
getCustomerBalance
().
add
(
custRecharge
.
getActualReceipt
());
custInfo
.
setCustomerBalance
(
newBalance
);
custRecharge
.
setCustomerBalance
(
newBalance
);
custInfoServiceImpl
.
merge
(
custInfo
);
}
}
//增加操作
//增加操作
...
...
src/main/java/org/rcisoft/bus/storegoodsapply/entity/StoreGoodsApply.java
View file @
86c923b0
...
@@ -163,5 +163,7 @@ public class StoreGoodsApply extends CyIdIncreEntity<StoreGoodsApply> {
...
@@ -163,5 +163,7 @@ public class StoreGoodsApply extends CyIdIncreEntity<StoreGoodsApply> {
private
String
payType
;
private
String
payType
;
private
Integer
customerId
;
}
}
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