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
3d1453a8
Commit
3d1453a8
authored
Jul 19, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
f546f31f
a3798099
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
87 additions
and
39 deletions
+87
-39
RabbitConstant.java
...wxiaoqi/security/common/config/rabbit/RabbitConstant.java
+6
-1
AppUserVo.java
.../java/com/github/wxiaoqi/security/admin/vo/AppUserVo.java
+1
-1
RabbitAdminConfig.java
...thub/wxiaoqi/security/admin/config/RabbitAdminConfig.java
+6
-10
IntegralMQHandler.java
...hub/wxiaoqi/security/admin/handler/IntegralMQHandler.java
+1
-1
AppUserDetailMapper.java
...ub/wxiaoqi/security/admin/mapper/AppUserDetailMapper.java
+1
-1
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+15
-9
AppUserDetailMapper.xml
...e-admin/src/main/resources/mapper/AppUserDetailMapper.xml
+1
-0
RabbitActivityConfig.java
...m/xxfc/platform/activity/config/RabbitActivityConfig.java
+7
-5
BaseOrder.java
...c/main/java/com/xxfc/platform/order/entity/BaseOrder.java
+6
-6
OrderMQDTO.java
...main/java/com/xxfc/platform/order/pojo/mq/OrderMQDTO.java
+25
-0
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+13
-1
OrderTourService.java
...ava/com/xxfc/platform/order/service/OrderTourService.java
+5
-4
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/config/rabbit/RabbitConstant.java
View file @
3d1453a8
...
...
@@ -15,7 +15,12 @@ public class RabbitConstant {
public
static
final
String
ORDER_TOPIC
=
ORDER
+
TOPIC_EXC
;
/**************************key*********************************/
public
static
final
String
KEY_REGISTER_SUCCESS
=
"register.success"
;
public
static
final
String
KEY_APPUSER_REGISTER
=
"appUser.register"
;
public
static
final
String
KEY_APPUSER_AUTH
=
"appUser.auth"
;
public
static
final
String
KEY_ORDER_PAY
=
"order.pay"
;
public
static
final
String
KEY_ORDER_FINLISH
=
"order.finlish"
;
public
static
final
String
KEY_ORDER_CANCEL
=
"order.cancel"
;
static
{
exchangeTopicSet
=
new
HashSet
<
String
>()
{{
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/AppUserVo.java
View file @
3d1453a8
...
...
@@ -82,7 +82,7 @@ public class AppUserVo {
@ApiModelProperty
(
value
=
"邀请人id:"
)
private
Integer
inviterAccount
;
@ApiModelProperty
(
value
=
"1-
新人用户;2-未激活;3
-激活:"
)
@ApiModelProperty
(
value
=
"1-
未激活;2
-激活:"
)
private
Integer
state
;
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/config/RabbitAdminConfig.java
View file @
3d1453a8
...
...
@@ -3,15 +3,11 @@ package com.github.wxiaoqi.security.admin.config;
import
com.github.wxiaoqi.security.common.config.RabbitCommonConfig
;
import
com.github.wxiaoqi.security.common.config.rabbit.BindDTO
;
import
com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant
;
import
org.springframework.amqp.core.*
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
javax.annotation.PostConstruct
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.*;
/**
* rabbitmq配置类
* 包含: 不知道什么orderWater队列
...
...
@@ -23,13 +19,13 @@ public class RabbitAdminConfig extends RabbitCommonConfig {
public
static
final
String
ORDER_WATER_QUEUE
=
"order.water.queue"
;
public
static
final
String
ORDER_FINLISH_
user_re
_QUEUE
=
"order.cancel.userRe.queue"
;
public
static
final
String
ORDER_FINLISH_
USER_RE
_QUEUE
=
"order.cancel.userRe.queue"
;
static
{
myQueue
=
new
ArrayList
<
BindDTO
>(){{
add
(
new
BindDTO
(
ORDER_WATER_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"order.pay"
));
add
(
new
BindDTO
(
ORDER_WATER_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"order.finlish"
));
add
(
new
BindDTO
(
ORDER_WATER_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"order.cancel"
));
add
(
new
BindDTO
(
ORDER_FINLISH_user_re_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"order.finlish"
));
add
(
new
BindDTO
(
ORDER_WATER_QUEUE
,
ADMIN_TOPIC
,
KEY_ORDER_PAY
));
add
(
new
BindDTO
(
ORDER_WATER_QUEUE
,
ADMIN_TOPIC
,
KEY_ORDER_FINLISH
));
add
(
new
BindDTO
(
ORDER_WATER_QUEUE
,
ADMIN_TOPIC
,
KEY_ORDER_CANCEL
));
add
(
new
BindDTO
(
ORDER_FINLISH_USER_RE_QUEUE
,
ADMIN_TOPIC
,
KEY_ORDER_FINLISH
));
}};
}
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/handler/IntegralMQHandler.java
View file @
3d1453a8
...
...
@@ -32,7 +32,7 @@ public class IntegralMQHandler {
}
@RabbitListener
(
queues
=
{
ORDER_FINLISH_
user_re
_QUEUE
})
@RabbitListener
(
queues
=
{
ORDER_FINLISH_
USER_RE
_QUEUE
})
public
void
integralHandler2
(
String
json
)
{
log
.
info
(
"接收到的消息:json = {}"
,
json
);
try
{
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/AppUserDetailMapper.java
View file @
3d1453a8
...
...
@@ -12,7 +12,7 @@ import java.util.List;
public
interface
AppUserDetailMapper
extends
Mapper
<
AppUserDetail
>
{
//查询用户信息
public
AppUserVo
getUserInfo
(
@Param
(
"userId"
)
Integer
userId
);
AppUserVo
getUserInfo
(
@Param
(
"userId"
)
Integer
userId
);
List
<
AppUserManageVo
>
selectAppUserManage
(
AppUserManageDTO
appUserManageDTO
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
3d1453a8
...
...
@@ -50,7 +50,7 @@ import javax.annotation.Resource;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.
KEY_REGISTER_SUCCESS
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.
*
;
/**
* @author keliii
...
...
@@ -340,7 +340,14 @@ public class AppPermissionService {
registerQueueDTO
.
setInParamDTO
(
new
RegisterParamDTO
(
username
,
password
,
headimgurl
,
nickname
,
mobilecode
,
openId
,
unionid
,
type
,
code
,
activityCode
));
// 注册成功,发送队列
mqSenderFeign
.
sendMessage
(
RabbitConstant
.
ADMIN_TOPIC
,
KEY_REGISTER_SUCCESS
,
JSONUtil
.
toJsonStr
(
registerQueueDTO
));
switch
(
sign
){
case
1
:
mqSenderFeign
.
sendMessage
(
RabbitConstant
.
ADMIN_TOPIC
,
KEY_APPUSER_REGISTER
,
JSONUtil
.
toJsonStr
(
registerQueueDTO
));
case
2
:
mqSenderFeign
.
sendMessage
(
RabbitConstant
.
ADMIN_TOPIC
,
KEY_APPUSER_AUTH
,
JSONUtil
.
toJsonStr
(
registerQueueDTO
));
default
:
break
;
}
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
}
...
...
@@ -387,15 +394,17 @@ public class AppPermissionService {
activityCode
=
codes
[
1
];
}
}
if
(
StringUtils
.
isNotBlank
(
code1
)){
Integer
parentId
=
appUserDetailBiz
.
getUserByCode
(
code1
);
Integer
parentId
=
0
;
if
(
StringUtils
.
isNotBlank
(
code1
))
{
parentId
=
appUserDetailBiz
.
getUserByCode
(
code1
);
//绑定上下线关系
if
(
parentId
!=
null
&&
parentId
>
0
)
{
if
(
parentId
!=
null
&&
parentId
>
0
)
{
relationBiz
.
bindRelation
(
userid
,
parentId
,
1
);
}
}
//活动消息
Integer
state
=
userVo
.
getState
();
if
(
state
!=
null
&&
state
==
1
&&
StringUtils
.
isNotBlank
(
activityCode
)
){
if
(
state
!=
null
&&
state
==
1
){
if
(
userVo
.
getInviterAccount
()==
null
||
userVo
.
getInviterAccount
()==
0
){
userVo
.
setInviterAccount
(
parentId
);
}
...
...
@@ -403,9 +412,6 @@ public class AppPermissionService {
appUserDetailBiz
.
updUuserInfoById
(
userVo
);
sendQueue
(
username
,
null
,
headimgurl
,
nickname
,
null
,
null
,
null
,
null
,
code1
,
activityCode
,
userid
,
RegisterQueueDTO
.
SIGN_ACTIVATE
);
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
...
...
ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
View file @
3d1453a8
...
...
@@ -30,6 +30,7 @@
<result
column=
"source"
property=
"source"
/>
<result
column=
"code"
property=
"code"
/>
<result
column=
"invitera_ccount"
property=
"inviterAccount"
/>
<result
column=
"state"
property=
"state"
/>
</resultMap>
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/config/RabbitActivityConfig.java
View file @
3d1453a8
...
...
@@ -8,6 +8,8 @@ import org.springframework.context.annotation.Configuration;
import
java.util.ArrayList
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.*;
/**
* rabbitmq配置类
* 包含: 不知道什么orderWater队列
...
...
@@ -24,11 +26,11 @@ public class RabbitActivityConfig extends RabbitCommonConfig {
public
static
final
String
INTEGRAL_HANDLE_QUEUE
=
"integral_handle_queue"
;
static
{
myQueue
=
new
ArrayList
<
BindDTO
>(){{
add
(
new
BindDTO
(
INTEGRAL_QUEUE
,
RabbitConstant
.
ORDER_TOPIC
,
"order.#"
));
add
(
new
BindDTO
(
POPULARZIE_0101_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"appUser.register"
));
add
(
new
BindDTO
(
POPULARZIE_0101_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"appUser.auth"
));
add
(
new
BindDTO
(
ACTIVITY_NEW_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"appUser.register"
));
add
(
new
BindDTO
(
ACTIVITY_NEW_QUEUE
,
RabbitConstant
.
ADMIN_TOPIC
,
"appUser.auth"
));
add
(
new
BindDTO
(
INTEGRAL_QUEUE
,
ORDER_TOPIC
,
"order.#"
));
add
(
new
BindDTO
(
POPULARZIE_0101_QUEUE
,
ADMIN_TOPIC
,
KEY_APPUSER_REGISTER
));
add
(
new
BindDTO
(
POPULARZIE_0101_QUEUE
,
ADMIN_TOPIC
,
KEY_APPUSER_AUTH
));
add
(
new
BindDTO
(
ACTIVITY_NEW_QUEUE
,
ADMIN_TOPIC
,
KEY_APPUSER_REGISTER
));
add
(
new
BindDTO
(
ACTIVITY_NEW_QUEUE
,
ADMIN_TOPIC
,
KEY_APPUSER_AUTH
));
add
(
new
BindDTO
(
INTEGRAL_HANDLE_QUEUE
,
MQconstant
.
INTEGRAL_EXCHANGE
,
MQconstant
.
INTEGRAL_ROUTING_KEY
));
}};
}
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/BaseOrder.java
View file @
3d1453a8
...
...
@@ -59,12 +59,12 @@ public class BaseOrder implements Serializable {
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"订单状态"
+
"0--删除"
+
"1--创建订单"
+
"2--取消"
+
"3--待付款"
+
"4--待出行"
+
"5--出行中(进行中)"
+
"0--删除"
+
"1--创建订单"
+
"2--取消"
+
"3--待付款"
+
"4--待出行"
+
"5--出行中(进行中)"
+
"6--已完成"
)
private
Integer
status
;
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/mq/OrderMQDTO.java
0 → 100644
View file @
3d1453a8
package
com
.
xxfc
.
platform
.
order
.
pojo
.
mq
;
import
lombok.Data
;
@Data
public
class
OrderMQDTO
{
public
static
final
Integer
ORDER_CRT
=
1
;
public
static
final
Integer
ORDER_CANCEL
=
2
;
public
static
final
Integer
ORDER_PAY
=
4
;
public
static
final
Integer
ORDER_FINISH
=
6
;
Integer
orderId
;
/**
* 标记是什么操作
* 0--删除"
* 1--创建订单"
* 2--取消"
*
* 4--已支付"
*
* 6--已完成
*/
Integer
sign
;
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
3d1453a8
...
...
@@ -17,11 +17,11 @@ import com.xxfc.platform.order.contant.enumerate.RefundStatusEnum;
import
com.xxfc.platform.order.contant.enumerate.RefundTypeEnum
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.mapper.BaseOrderMapper
;
import
com.xxfc.platform.order.pojo.mq.OrderMQDTO
;
import
com.xxfc.platform.order.pojo.order.OrderListVo
;
import
com.xxfc.platform.order.pojo.order.OrderPageVO
;
import
com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.universal.dto.SmsTemplateDTO
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.vo.OrderRefundVo
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
...
...
@@ -512,4 +512,16 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
return
zero
;
}
private
void
sendQueue
(
Integer
orderId
,
Integer
sign
)
{
try
{
OrderMQDTO
orderMQDTO
=
new
OrderMQDTO
(){{
setOrderId
(
orderId
);
setSign
(
sign
);
}};
//mqSenderFeign.sendMessage(RabbitConstant.ADMIN_TOPIC, KEY_REGISTER_SUCCESS, JSONUtil.toJsonStr(orderMQDTO));
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
}
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderTourService.java
View file @
3d1453a8
...
...
@@ -209,16 +209,17 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To
insureAmount
=
insureAmount
.
add
(
INSURE_PRICE
.
multiply
(
new
BigDecimal
(
String
.
valueOf
(
detail
.
getTotalNumber
()
*
detail
.
getTourGood
().
getNumber
()))));
}
//总价
tourAmount
=
tourAmount
.
add
(
tourSpePriceVo
.
getTotalPrice
()).
add
(
tourSpePriceVo
.
getTotalChildPrice
());
//商品价格
goodsAmount
=
goodsAmount
.
add
(
tourAmount
);
//优惠券处理
//待完成
if
(
null
!=
detail
.
getTickerNo
()
&&
detail
.
getTickerNo
().
size
()
>
0
)
{
couponAmount
=
activityFeign
.
use
(
dto
.
getUserid
(),
detail
.
getTickerNo
().
get
(
0
),
detail
.
getOrder
().
getNo
(),
channel
,
goodsAmount
,
ActivityFeign
.
TYPE_NO_USE
);
}
//总价
tourAmount
=
tourAmount
.
add
(
tourSpePriceVo
.
getTotalPrice
()).
add
(
tourSpePriceVo
.
getTotalChildPrice
());
//商品价格
goodsAmount
=
goodsAmount
.
add
(
tourAmount
);
//总价格
orderAmount
=
orderAmount
.
add
(
goodsAmount
).
add
(
insureAmount
);
...
...
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