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
34ec5b45
Commit
34ec5b45
authored
Aug 10, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.5.52.3/youjj/cloud-platform
into dev2
parents
9160bca0
e00fe2ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
4 deletions
+34
-4
AppUserRelationBiz.java
...github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
+1
-1
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+9
-3
SendMsgDTO.java
...main/java/com/xxfc/platform/universal/dto/SendMsgDTO.java
+10
-0
MQSenderFeign.java
...java/com/xxfc/platform/universal/feign/MQSenderFeign.java
+6
-0
MQSenderController.java
...xfc/platform/universal/controller/MQSenderController.java
+8
-0
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
View file @
34ec5b45
...
@@ -155,12 +155,12 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
...
@@ -155,12 +155,12 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
public
void
upRelationTemp
(
Integer
pid
,
Integer
userid
){
public
void
upRelationTemp
(
Integer
pid
,
Integer
userid
){
AppUserRelationTemp
relationTemp
=
new
AppUserRelationTemp
();
AppUserRelationTemp
relationTemp
=
new
AppUserRelationTemp
();
relationTemp
.
setUserId
(
pid
);
relationTemp
.
setTempId
(
userid
);
relationTemp
.
setTempId
(
userid
);
relationTemp
.
setIsDel
(
0
);
relationTemp
.
setIsDel
(
0
);
relationTemp
.
setType
(
1
);
relationTemp
.
setType
(
1
);
AppUserRelationTemp
relationTemp1
=
relationTempBiz
.
selectOne
(
relationTemp
);
AppUserRelationTemp
relationTemp1
=
relationTempBiz
.
selectOne
(
relationTemp
);
if
(
relationTemp1
==
null
){
if
(
relationTemp1
==
null
){
relationTemp
.
setUserId
(
pid
);
relationTempBiz
.
insertSelective
(
relationTemp
);
relationTempBiz
.
insertSelective
(
relationTemp
);
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
34ec5b45
...
@@ -24,6 +24,7 @@ import com.xxfc.platform.order.pojo.order.OrderPageVO;
...
@@ -24,6 +24,7 @@ import com.xxfc.platform.order.pojo.order.OrderPageVO;
import
com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
;
import
com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.dto.SendMsgDTO
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.feign.MQSenderFeign
;
import
com.xxfc.platform.universal.feign.MQSenderFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
...
@@ -434,19 +435,24 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
...
@@ -434,19 +435,24 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
private
void
sendQueue
(
OrderMQDTO
orderMQDTO
,
Integer
sign
)
{
private
void
sendQueue
(
OrderMQDTO
orderMQDTO
,
Integer
sign
)
{
try
{
try
{
orderMQDTO
.
setSign
(
sign
);
orderMQDTO
.
setSign
(
sign
);
SendMsgDTO
sendMsgDTO
=
new
SendMsgDTO
(){{
setExchange
(
ORDER_TOPIC
);
setJson
(
JSONUtil
.
toJsonStr
(
orderMQDTO
));
}};
switch
(
sign
)
{
switch
(
sign
)
{
case
2
:
case
2
:
mqSenderFeign
.
sendMessage
(
ORDER_TOPIC
,
KEY_ORDER_CANCEL
,
JSONUtil
.
toJsonStr
(
orderMQDTO
)
);
sendMsgDTO
.
setRoutKey
(
KEY_ORDER_CANCEL
);
break
;
break
;
case
4
:
case
4
:
mqSenderFeign
.
sendMessage
(
ORDER_TOPIC
,
KEY_ORDER_PAY
,
JSONUtil
.
toJsonStr
(
orderMQDTO
)
);
sendMsgDTO
.
setRoutKey
(
KEY_ORDER_PAY
);
break
;
break
;
case
6
:
case
6
:
mqSenderFeign
.
sendMessage
(
ORDER_TOPIC
,
KEY_ORDER_FINLISH
,
JSONUtil
.
toJsonStr
(
orderMQDTO
)
);
sendMsgDTO
.
setRoutKey
(
KEY_ORDER_FINLISH
);
break
;
break
;
default
:
default
:
break
;
break
;
}
}
mqSenderFeign
.
postSendMessage
(
BeanUtil
.
beanToMap
(
sendMsgDTO
,
Boolean
.
FALSE
,
Boolean
.
TRUE
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
}
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/dto/SendMsgDTO.java
0 → 100644
View file @
34ec5b45
package
com
.
xxfc
.
platform
.
universal
.
dto
;
import
lombok.Data
;
@Data
public
class
SendMsgDTO
{
String
exchange
;
String
routKey
;
String
json
;
}
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/feign/MQSenderFeign.java
View file @
34ec5b45
...
@@ -3,12 +3,18 @@ package com.xxfc.platform.universal.feign;
...
@@ -3,12 +3,18 @@ package com.xxfc.platform.universal.feign;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.Map
;
@FeignClient
(
value
=
"xx-universal"
,
contextId
=
"sendMessage"
)
@FeignClient
(
value
=
"xx-universal"
,
contextId
=
"sendMessage"
)
public
interface
MQSenderFeign
{
public
interface
MQSenderFeign
{
@GetMapping
(
value
=
"/message/sendMessage"
)
@GetMapping
(
value
=
"/message/sendMessage"
)
public
ObjectRestResponse
sendMessage
(
@RequestParam
(
value
=
"exchange"
)
String
exchange
,
@RequestParam
(
value
=
"routKey"
)
String
routKey
,
@RequestParam
(
value
=
"json"
)
String
json
);
public
ObjectRestResponse
sendMessage
(
@RequestParam
(
value
=
"exchange"
)
String
exchange
,
@RequestParam
(
value
=
"routKey"
)
String
routKey
,
@RequestParam
(
value
=
"json"
)
String
json
);
@PostMapping
(
value
=
"/message/sendMessage"
)
public
ObjectRestResponse
postSendMessage
(
@RequestParam
(
"entity"
)
Map
<
String
,
Object
>
entity
);
}
}
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/MQSenderController.java
View file @
34ec5b45
...
@@ -2,8 +2,10 @@ package com.xxfc.platform.universal.controller;
...
@@ -2,8 +2,10 @@ package com.xxfc.platform.universal.controller;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.universal.biz.MQServiceBiZ
;
import
com.xxfc.platform.universal.biz.MQServiceBiZ
;
import
com.xxfc.platform.universal.dto.SendMsgDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -19,4 +21,10 @@ public class MQSenderController {
...
@@ -19,4 +21,10 @@ public class MQSenderController {
return
mqServiceBiZ
.
sendMessage
(
exchange
,
routKey
,
json
);
return
mqServiceBiZ
.
sendMessage
(
exchange
,
routKey
,
json
);
}
}
@PostMapping
(
value
=
"/sendMessage"
)
public
ObjectRestResponse
sendMessage
(
SendMsgDTO
dto
)
{
return
mqServiceBiZ
.
sendMessage
(
dto
.
getExchange
(),
dto
.
getRoutKey
(),
dto
.
getJson
());
}
}
}
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