Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
yohoufo-fore
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
TANLING
5 years ago
Commit
bc60eca2a5b3e8542a6713e0857c6e1d3c68a4f6
1 parent
d95468fd
fix bug
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
22 deletions
order/src/main/java/com/yohoufo/order/service/handler/payment/PayServiceFactory.java
order/src/main/java/com/yohoufo/order/service/impl/OrdersPayService.java
order/src/main/java/com/yohoufo/order/service/impl/StoreSellerServiceImpl.java
web/src/main/resources/rabbitmq.yml
order/src/main/java/com/yohoufo/order/service/handler/payment/PayServiceFactory.java
View file @
bc60eca
...
...
@@ -122,14 +122,15 @@ public class PayServiceFactory implements ApplicationContextAware {
payService
=
youfuAppWeixinPayService
;
}
else
if
(
payment
==
Payment
.
ALIPAY
)
{
else
if
(
payment
==
Payment
.
ALIPAY
||
payment
==
Payment
.
ALIPAY_HB
||
payment
==
Payment
.
ALIPAY_HBFQ
)
{
payService
=
alipayService
;
}
else
if
(
payment
==
Payment
.
YOUFU_ALIPAY
||
payment
==
Payment
.
ALIPAY_HB
||
payment
==
Payment
.
ALIPAY_HBFQ
){
||
payment
==
Payment
.
YOUFU_ALIPAY_HB
||
payment
==
Payment
.
YOUFU_ALIPAY_HBFQ
){
payService
=
youfuAlipayService
;
}
else
if
(
payment
==
Payment
.
MINIAPP
)
{
payService
=
miniappWeixinPayService
;
...
...
order/src/main/java/com/yohoufo/order/service/impl/OrdersPayService.java
View file @
bc60eca
...
...
@@ -91,7 +91,7 @@ public class OrdersPayService {
.
map
(
e
->
convertToCmsPayVO
(
e
))
.
collect
(
Collectors
.
toList
());
// >=6.9.2
1
启用新的支付主体
// >=6.9.2
3
启用新的支付主体
replaceNewPayment
(
request
,
cmsPayRspList
);
if
(
request
.
getOrderCode
()
>
0
){
...
...
@@ -147,7 +147,7 @@ public class OrdersPayService {
}
private
void
replaceNewPayment
(
OrderPayRequest
request
,
List
<
PayListDetailVO
.
CmsPayVO
>
cmsPayRspList
)
{
// >=6.9.2
1
启用新的支付主体
// >=6.9.2
3
启用新的支付主体
AppVersion
currentAppVersion
=
AppVersion
.
of
(
request
.
getAppVersion
());
if
(
currentAppVersion
.
greaterThanOrEquals
(
AppVersion
.
of
(
"6.9.23"
))){
// 新的版本,微信|支付宝 都使用新的appid
...
...
order/src/main/java/com/yohoufo/order/service/impl/StoreSellerServiceImpl.java
View file @
bc60eca
...
...
@@ -416,7 +416,8 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
OrderAttributes
.
FLAW
.
getCode
(),
OrderAttributes
.
SECOND_HAND
.
getCode
(),
OrderAttributes
.
ADVANCE_SALE
.
getCode
()));
// 需要下架的skup
Pair
<
List
<
Integer
>,
Double
>
goodsEarnest
=
getDownselfSkupAppointMoney
(
sellerOrderGoods
,
YHMath
.
sub
(
statistics
.
getEarnestTotal
(),
statistics
.
getLeftMoney
()),
statistics
.
getUid
());
Pair
<
List
<
Integer
>,
Double
>
goodsEarnest
=
getDownselfSkupAppointMoney
(
sellerOrderGoods
,
YHMath
.
sub
(
statistics
.
getEarnestTotal
(),
statistics
.
getLeftMoney
()),
statistics
.
getUid
());
downSelfSkupMap
.
put
(
statistics
.
getUid
(),
goodsEarnest
.
getKey
());
...
...
@@ -514,22 +515,21 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
for
(
SellerOrderGoods
good
:
sellerOrderGoods
){
double
rate
=
0
;
double
skupEarnest
=
0.00
;
if
(
good
.
getAttributes
()
==
OrderAttributes
.
COMMON_IN_STOCK
.
getCode
()
||
good
.
getAttributes
()
==
OrderAttributes
.
FLAW
.
getCode
()
||
good
.
getAttributes
()
==
OrderAttributes
.
SECOND_HAND
.
getCode
()){
rate
=
0.04
;
earnest
=
YHMath
.
add
(
earnest
,
YHMath
.
mul
(
good
.
getGoodsPrice
().
doubleValue
(),
rate
));
earnest
=
redefinedEarnest
(
earnest
,
200
,
28
);
skupEarnest
=
redefinedEarnest
(
YHMath
.
mul
(
good
.
getGoodsPrice
().
doubleValue
(),
rate
),
200
,
28
);
earnest
=
YHMath
.
add
(
earnest
,
skupEarnest
);
}
else
if
(
good
.
getAttributes
()
==
OrderAttributes
.
ADVANCE_SALE
.
getCode
()){
rate
=
0.08
;
earnest
=
YHMath
.
add
(
earnest
,
YHMath
.
mul
(
good
.
getGoodsPrice
().
doubleValue
(),
rate
));
earnest
=
redefinedEarnest
(
earnest
,
400
,
40
);
skupEarnest
=
redefinedEarnest
(
YHMath
.
mul
(
good
.
getGoodsPrice
().
doubleValue
(),
rate
),
400
,
40
);
earnest
=
YHMath
.
add
(
earnest
,
skupEarnest
);
}
scriptLogger
.
info
(
"{} process calculate, skup {}, earnest"
,
uid
,
skup
,
skupEarnest
);
skup
.
add
(
good
.
getId
());
// 一旦金额达到 指定的金额, 则不需要继续查找skup
if
(
YHMath
.
sub
(
earnest
,
exceed
)
>=
0
){
...
...
web/src/main/resources/rabbitmq.yml
View file @
bc60eca
...
...
@@ -93,7 +93,7 @@ consumer:
interval
:
10
#更新物流调拨信息
-
address
:
192.168.10
2.45
:5672
-
address
:
192.168.10
4.244
:5672
username
:
yoho
password
:
yoho
consumers
:
...
...
@@ -101,14 +101,14 @@ consumer:
topic
:
ufo.order.updateExpressInfo
#ocr百度云开关
-
address
:
192.168.10
2.45
:5672
-
address
:
192.168.10
4.244
:5672
username
:
yoho
password
:
yoho
consumers
:
-
class
:
com.yohoufo.user.consumer.OrcSwitchUpdateConsumer
topic
:
reviewed.ocr.limit
-
address
:
192.168.10
2.45
:5672
-
address
:
192.168.10
4.244
:5672
username
:
yoho
password
:
yoho
consumers
:
...
...
@@ -127,19 +127,19 @@ consumer:
ratelimit
:
20
producer
:
-
address
:
192.168.10
2.45
:5672
-
address
:
192.168.10
4.244
:5672
producers
:
-
bean
:
browseProducer
#only once named in classpath
-
address
:
192.168.10
2.45
:5672
-
address
:
192.168.10
4.244
:5672
producers
:
-
bean
:
yhProducer
-
address
:
192.168.10
2.45
:5672
-
address
:
192.168.10
4.244
:5672
producers
:
-
bean
:
ufoExpressInfoProducer
-
address
:
192.168.10
2.45
:5672
-
address
:
192.168.10
4.244
:5672
username
:
yoho
password
:
yoho
producers
:
...
...
@@ -148,7 +148,7 @@ producer:
confirmcallback
:
orderMessageConfirmCallback
# crm
-
address
:
192.168.10
2.45
:5672
-
address
:
192.168.10
4.244
:5672
producers
:
-
bean
:
crmMqProducer
trace
:
true
\ No newline at end of file
...
...
Please
register
or
login
to post a comment