Toggle navigation
Toggle navigation
This project
Loading...
Sign in
zyn
/
cjs-site
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangbeiyong@zhaoonline.com
2019-03-06 13:41:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21a5efb99137e15b977cbe646ead58c167d971f2
21a5efb9
1 parent
dff2266a
提货时候,余额足够就扣否则不扣
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
15 deletions
src/main/java/com/cjs/site/biz/pub/ZhaoonlineBiz.java
src/main/java/com/cjs/site/biz/user/pick/PickBiz.java
src/main/java/com/cjs/site/biz/pub/ZhaoonlineBiz.java
View file @
21a5efb
...
...
@@ -56,7 +56,7 @@ public class ZhaoonlineBiz {
throw
new
ServiceException
(
"赵涌在线账号应为7位数字用户ID或11位手机号码"
);
}
String
uri
=
"http
://zhaom3.services.zhao-cloud
.com"
;
String
uri
=
"http
s://appservices.zhaoonline
.com"
;
uri
+=
"/api/user/"
+
userId
+
"/exist"
;
Map
<
String
,
Object
>
response
=
restClient
.
getForObject
(
uri
,
Map
.
class
);
log
.
info
(
"检查赵涌在线账号是否存在["
+
userId
+
"]:"
+
response
);
...
...
src/main/java/com/cjs/site/biz/user/pick/PickBiz.java
View file @
21a5efb
...
...
@@ -44,7 +44,7 @@ import com.cjs.site.util.web.ActionUtil;
/**
* 提货
*
*
* @author tongyufu
*
*/
...
...
@@ -314,24 +314,35 @@ public class PickBiz {
return
resultInfo
;
}
String
userId
=
ActionUtil
.
getUser
().
getUserId
();
Map
<
String
,
Object
>
balance
=
fundBiz
.
balance
(
userId
);
Double
enableBalance
=
0.00
;
if
(
balance
.
get
(
"enable_balance"
)
!=
null
){
enableBalance
=
Double
.
valueOf
(
balance
.
get
(
"enable_balance"
).
toString
());
}
//普通物流提货,收取6元物流包装费
if
(
"0"
.
equals
(
pack
)
&&
"2"
.
equals
(
pickInfo
.
getPickType
()))
{
if
(
pickInfo
.
isMerge
())
{
pickDao
.
mergeOrder
(
pickInfo
);
}
else
{
//收取6元物流包装费
T2Result
result
=
fundBiz
.
subtractSysFund
(
pickInfo
.
getPickNo
(),
ConstInfo
.
Fund
.
USER_PICK
,
user
.
getClient_id
(),
-
6.0
,
ConstInfo
.
Fund
.
USER_PICK_REMARK
);
log
.
info
(
"收取提货包装费["
+
pickInfo
.
getPickNo
()
+
"]:"
+
result
);
if
(
enableBalance
>=
6
){
//收取6元物流包装费
T2Result
result
=
fundBiz
.
subtractSysFund
(
pickInfo
.
getPickNo
(),
ConstInfo
.
Fund
.
USER_PICK
,
user
.
getClient_id
(),
-
6.0
,
ConstInfo
.
Fund
.
USER_PICK_REMARK
);
log
.
info
(
"收取提货包装费["
+
pickInfo
.
getPickNo
()
+
"]:"
+
result
);
}
}
}
//封装提货,收取费用
if
(
"1"
.
equals
(
pack
))
{
T2Result
result
=
fundBiz
.
subtractSysFund
(
pickInfo
.
getPickNo
(),
ConstInfo
.
Fund
.
USER_PICK
,
user
.
getClient_id
(),
-
pickInfo
.
getAmountFee
(),
ConstInfo
.
Fund
.
USER_PICK_REMARK
);
log
.
info
(
"收取提货包装费["
+
pickInfo
.
getPickNo
()
+
"]:"
+
result
);
if
(
enableBalance
>=
pickInfo
.
getAmountFee
()){
T2Result
result
=
fundBiz
.
subtractSysFund
(
pickInfo
.
getPickNo
(),
ConstInfo
.
Fund
.
USER_PICK
,
user
.
getClient_id
(),
-
pickInfo
.
getAmountFee
(),
ConstInfo
.
Fund
.
USER_PICK_REMARK
);
log
.
info
(
"收取提货包装费["
+
pickInfo
.
getPickNo
()
+
"]:"
+
result
);
}
}
return
resultInfo
;
}
...
...
@@ -382,8 +393,10 @@ public class PickBiz {
double
totalFee
=
0
;
String
userId
=
ActionUtil
.
getUser
().
getUserId
();
Map
<
String
,
Object
>
balance
=
fundBiz
.
balance
(
userId
);
Double
enableBalance
=
Double
.
valueOf
(
balance
.
get
(
"enable_balance"
).
toString
());
Double
enableBalance
=
0.00
;
if
(
balance
.
get
(
"enable_balance"
)
!=
null
){
enableBalance
=
Double
.
valueOf
(
balance
.
get
(
"enable_balance"
).
toString
());
}
//封装提货
if
(
"1"
.
equals
(
pack
))
{
Integer
packageId
=
Integer
.
valueOf
(
session
.
getAttribute
(
"packageId"
).
toString
());
...
...
@@ -406,9 +419,9 @@ public class PickBiz {
totalFee
+=
6
;
}
pickInfo
.
setAmountFee
(
totalFee
);
if
(
enableBalance
<
totalFee
)
{
/*
if (enableBalance < totalFee) {
return new ResultInfo(0, "账户可用余额少于" + totalFee + "元,无法支付提货费用");
}
}
*/
return
new
ResultInfo
(
1
,
""
);
}
...
...
Please
register
or
login
to post a comment