Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
6f3d2e9b
Commit
6f3d2e9b
authored
Jul 19, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
a6794c9d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
10 deletions
+21
-10
RabbitCommonConfig.java
...ub/wxiaoqi/security/common/config/RabbitCommonConfig.java
+3
-1
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+10
-4
RabbitActivityConfig.java
...m/xxfc/platform/activity/config/RabbitActivityConfig.java
+2
-5
OrderRentVehicleController.java
.../xxfc/platform/order/rest/OrderRentVehicleController.java
+1
-0
OrderRentVehicleService.java
.../xxfc/platform/order/service/OrderRentVehicleService.java
+5
-0
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/config/RabbitCommonConfig.java
View file @
6f3d2e9b
...
@@ -52,7 +52,9 @@ public abstract class RabbitCommonConfig {
...
@@ -52,7 +52,9 @@ public abstract class RabbitCommonConfig {
if
(
null
!=
myQueue
)
{
if
(
null
!=
myQueue
)
{
myQueue
.
forEach
(
en
->
{
myQueue
.
forEach
(
en
->
{
//避免一个队列绑定多个exchange+key 时 再次创建queueBean
//避免一个队列绑定多个exchange+key 时 再次创建queueBean
if
(
null
==
applicationContext
.
getBean
(
StrUtil
.
toCamelCase
(
en
.
getQueue
()),
Queue
.
class
))
{
try
{
Queue
queue
=
applicationContext
.
getBean
(
StrUtil
.
toCamelCase
(
en
.
getQueue
()),
Queue
.
class
);
}
catch
(
Exception
e
)
{
registerBean
(
StrUtil
.
toCamelCase
(
en
.
getQueue
()),
Queue
.
class
,
en
.
getQueue
(),
Boolean
.
TRUE
);
registerBean
(
StrUtil
.
toCamelCase
(
en
.
getQueue
()),
Queue
.
class
,
en
.
getQueue
(),
Boolean
.
TRUE
);
}
}
String
bindName
=
StrUtil
.
toCamelCase
(
en
.
getQueue
())+
"Binding"
+
en
.
getExchange
()+
"_"
+
en
.
getKey
();
String
bindName
=
StrUtil
.
toCamelCase
(
en
.
getQueue
())+
"Binding"
+
en
.
getExchange
()+
"_"
+
en
.
getKey
();
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
6f3d2e9b
...
@@ -148,6 +148,9 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
...
@@ -148,6 +148,9 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
//支付后更新优惠卷状态
//支付后更新优惠卷状态
public
BigDecimal
useTickerNo
(
Integer
userId
,
String
TickerNo
,
String
orderNo
,
Integer
channel
,
BigDecimal
amout
,
Integer
type
){
public
BigDecimal
useTickerNo
(
Integer
userId
,
String
TickerNo
,
String
orderNo
,
Integer
channel
,
BigDecimal
amout
,
Integer
type
){
BigDecimal
couponAmout
=
new
BigDecimal
(
"0.00"
);
BigDecimal
couponAmout
=
new
BigDecimal
(
"0.00"
);
if
(
couponAmout
.
compareTo
(
amout
)
>=
0
)
{
return
BigDecimal
.
ZERO
;
}
if
(
userId
==
null
||
userId
==
0
||
StringUtils
.
isBlank
(
TickerNo
)){
if
(
userId
==
null
||
userId
==
0
||
StringUtils
.
isBlank
(
TickerNo
)){
log
.
error
(
"----参数不能为空"
);
log
.
error
(
"----参数不能为空"
);
return
couponAmout
;
return
couponAmout
;
...
@@ -183,10 +186,13 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
...
@@ -183,10 +186,13 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
Integer
type
=
coupon
.
getType
();
Integer
type
=
coupon
.
getType
();
if
(
type
!=
null
)
{
if
(
type
!=
null
)
{
BigDecimal
useAmout
=
coupon
.
getUsedAmount
();
BigDecimal
useAmout
=
coupon
.
getUsedAmount
();
if
(
amout
.
compareTo
(
useAmout
)
>
0
)
{
if
(
type
==
3
||
(
type
==
1
&&
(
amout
.
compareTo
(
coupon
.
getWithAmount
())
>=
0
)))
{
if
(
type
==
3
||
(
type
==
1
&&
(
amout
.
compareTo
(
coupon
.
getWithAmount
())
>=
0
)))
{
//couponAmout = amout.subtract(useAmout);
//couponAmout = amout.subtract(useAmout);
couponAmout
=
useAmout
;
if
(
amout
.
compareTo
(
useAmout
)
>
0
)
{
couponAmout
=
useAmout
;
}
else
{
couponAmout
=
amout
;
}
}
}
}
}
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/config/RabbitActivityConfig.java
View file @
6f3d2e9b
...
@@ -22,16 +22,13 @@ import java.util.ArrayList;
...
@@ -22,16 +22,13 @@ import java.util.ArrayList;
public
class
RabbitActivityConfig
extends
RabbitCommonConfig
{
public
class
RabbitActivityConfig
extends
RabbitCommonConfig
{
public
static
final
String
INTEGRAL_QUEUE
=
"integral_queue"
;
public
static
final
String
INTEGRAL_QUEUE
=
"integral_queue"
;
// public static final String POPULARZIE_REGISTER_QUEUE = "popularzie.register.queue";
// public static final String POPULARZIE_AUTH_QUEUE = "popularzie.auth.queue";
public
static
final
String
POPULARZIE_0101_QUEUE
=
"popularzie.0101.queue"
;
public
static
final
String
POPULARZIE_0101_QUEUE
=
"popularzie.0101.queue"
;
static
{
static
{
myQueue
=
new
ArrayList
<
BindDTO
>(){{
myQueue
=
new
ArrayList
<
BindDTO
>(){{
add
(
new
BindDTO
(
INTEGRAL_QUEUE
,
RabbitConstant
.
ORDER_TOPIC
,
"order.#"
));
add
(
new
BindDTO
(
INTEGRAL_QUEUE
,
RabbitConstant
.
ORDER_TOPIC
,
"order.#"
));
add
(
new
BindDTO
(
POPULARZIE_0101_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"appUser.#"
));
add
(
new
BindDTO
(
POPULARZIE_0101_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"appUser.register"
));
// add(new BindDTO(POPULARZIE_REGISTER_QUEUE, RabbitConstant.ADMIN_TOPIC, "appUser.register"));
add
(
new
BindDTO
(
POPULARZIE_0101_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"appUser.auth"
));
// add(new BindDTO(POPULARZIE_AUTH_QUEUE, RabbitConstant.ADMIN_TOPIC, "appUser.login"));
}};
}};
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderRentVehicleController.java
View file @
6f3d2e9b
...
@@ -124,6 +124,7 @@ public class OrderRentVehicleController extends CommonBaseController {
...
@@ -124,6 +124,7 @@ public class OrderRentVehicleController extends CommonBaseController {
/**
/**
* 优惠券*
* 优惠券*
*/
*/
@ApiModelProperty
(
value
=
"优惠卷卷号"
)
private
String
tickerNos
;
private
String
tickerNos
;
}
}
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderRentVehicleService.java
View file @
6f3d2e9b
...
@@ -141,6 +141,11 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -141,6 +141,11 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
}
}
}
}
//如果有使用优惠券,则扣减
// if(BigDecimal.ZERO.compareTo(bo.getOrder().getCouponAmount()) >= 0) {
//
// }
super
.
handleDetail
(
bo
);
super
.
handleDetail
(
bo
);
//发送定时取消订单(数据字典设置--5分钟)
//发送定时取消订单(数据字典设置--5分钟)
...
...
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