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
a2769275
Commit
a2769275
authored
Aug 12, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
3d0879b0
056f807f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
17 deletions
+44
-17
AppUserRelationBiz.java
...github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
+18
-3
DataController.java
...om/github/wxiaoqi/security/admin/rest/DataController.java
+12
-2
OrderApplication.java
...c/main/java/com/xxfc/platform/order/OrderApplication.java
+2
-3
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+11
-8
MQSenderController.java
...xfc/platform/universal/controller/MQSenderController.java
+1
-1
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
View file @
a2769275
...
...
@@ -303,14 +303,29 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
}
public
void
deleteByMemberIds
(
Collection
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
AppUserRelation
.
class
);
Example
example
=
new
Example
(
AppUserRelation
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"parentId"
,
userIds
);
List
<
AppUserRelation
>
list
=
mapper
.
selectByExample
(
example
);
for
(
AppUserRelation
appUserRelation:
list
){
getMyBiz
().
delRelation
(
appUserRelation
.
getUserId
());
}
mapper
.
deleteByExample
(
example
);
Example
example2
=
new
Example
(
AppUserRelation
.
class
);
Example
.
Criteria
criteria1
=
example2
.
createCriteria
();
criteria1
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example2
);
for
(
Integer
userId:
userIds
){
getMyBiz
().
delRelation
(
userId
);
}
}
@CacheClear
(
key
=
"user:relation{1}"
)
public
void
delRelation
(
Integer
userId
){
}
}
\ No newline at end of file
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/DataController.java
View file @
a2769275
...
...
@@ -7,11 +7,13 @@ import com.github.wxiaoqi.security.admin.biz.AppUserSellingWaterBiz;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.feign.ActivityFeign
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.PostConstruct
;
import
java.util.*
;
/**
...
...
@@ -20,10 +22,16 @@ import java.util.*;
* @description
* @data 2019/7/24 15:11
*/
@ConditionalOnProperty
(
prefix
=
"data.clean"
,
name
=
"enable"
,
havingValue
=
"true"
)
@RestController
@RequestMapping
(
"/app/unauth/user_data"
)
public
class
DataController
{
@PostConstruct
public
void
init
(){
System
.
out
.
println
(
"启动了****************************"
);
}
@Autowired
private
AppUserLoginBiz
appUserLoginBiz
;
...
...
@@ -55,12 +63,14 @@ public class DataController {
}
@GetMapping
(
"/clear_relation_withphone"
)
public
ObjectRestResponse
<
Void
>
clearRelation
(
@RequestParam
(
"phones"
)
List
<
String
>
phones
){
Map
<
String
,
Integer
>
phoneAndUserIdMapByPhones
=
appUserLoginBiz
.
findPhoneAndUserIdMapByPhones
(
phones
);
public
ObjectRestResponse
<
Void
>
clearRelationphone
(
@RequestParam
(
"phones"
)
List
<
String
>
phons
)
{
Map
<
String
,
Integer
>
phoneAndUserIdMapByPhones
=
appUserLoginBiz
.
findPhoneAndUserIdMapByPhones
(
phons
);
if
(
Objects
.
nonNull
(
phoneAndUserIdMapByPhones
)){
Collection
<
Integer
>
userIds
=
phoneAndUserIdMapByPhones
.
values
();
appUserRelationBiz
.
deleteByMemberIds
(
userIds
);
appUserSellingWaterBiz
.
deleteByMemberIds
(
userIds
);
}
return
ObjectRestResponse
.
succ
();
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/OrderApplication.java
View file @
a2769275
...
...
@@ -12,9 +12,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
(
scanBasePackages
=
{
"com.xxfc.platform"
,
"com.github.wxiaoqi.security.common.handler"
// ,
// "com.github.wxiaoqi.security.common.log"
"com.github.wxiaoqi.security.common.handler"
,
"com.github.wxiaoqi.security.common.log"
})
@EnableDiscoveryClient
@EnableScheduling
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
a2769275
...
...
@@ -435,24 +435,27 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
private
void
sendQueue
(
OrderMQDTO
orderMQDTO
,
Integer
sign
)
{
try
{
orderMQDTO
.
setSign
(
sign
);
SendMsgDTO
sendMsgDTO
=
new
SendMsgDTO
(){{
setExchange
(
ORDER_TOPIC
);
}};
sendMsgDTO
.
setJson
(
JSONUtil
.
toJsonStr
(
orderMQDTO
));
//
SendMsgDTO sendMsgDTO = new SendMsgDTO(){{
//
setExchange(ORDER_TOPIC);
//
}};
//
sendMsgDTO.setJson(JSONUtil.toJsonStr(orderMQDTO));
switch
(
sign
)
{
case
2
:
sendMsgDTO
.
setRoutKey
(
KEY_ORDER_CANCEL
);
// sendMsgDTO.setRoutKey(KEY_ORDER_CANCEL);
mqSenderFeign
.
sendMessage
(
ORDER_TOPIC
,
KEY_ORDER_CANCEL
,
JSONUtil
.
toJsonStr
(
orderMQDTO
));
break
;
case
4
:
sendMsgDTO
.
setRoutKey
(
KEY_ORDER_PAY
);
// sendMsgDTO.setRoutKey(KEY_ORDER_PAY);
mqSenderFeign
.
sendMessage
(
ORDER_TOPIC
,
KEY_ORDER_PAY
,
JSONUtil
.
toJsonStr
(
orderMQDTO
));
break
;
case
6
:
sendMsgDTO
.
setRoutKey
(
KEY_ORDER_FINLISH
);
// sendMsgDTO.setRoutKey(KEY_ORDER_FINLISH);
mqSenderFeign
.
sendMessage
(
ORDER_TOPIC
,
KEY_ORDER_FINLISH
,
JSONUtil
.
toJsonStr
(
orderMQDTO
));
break
;
default
:
break
;
}
mqSenderFeign
.
postSendMessage
(
BeanUtil
.
beanToMap
(
sendMsgDTO
,
Boolean
.
FALSE
,
Boolean
.
TRUE
));
//
mqSenderFeign.postSendMessage(BeanUtil.beanToMap(sendMsgDTO, Boolean.FALSE, Boolean.TRUE));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
}
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/MQSenderController.java
View file @
a2769275
...
...
@@ -14,7 +14,7 @@ public class MQSenderController {
private
MQServiceBiZ
mqServiceBiZ
;
@GetMapping
(
value
=
"/sendMessage"
)
public
ObjectRestResponse
sendMessage
(
String
exchange
,
String
routKey
,
String
json
)
{
public
ObjectRestResponse
sendMessage
(
@RequestParam
(
value
=
"exchange"
)
String
exchange
,
@RequestParam
(
value
=
"routKey"
)
String
routKey
,
@RequestParam
(
value
=
"json"
)
String
json
)
{
return
mqServiceBiZ
.
sendMessage
(
exchange
,
routKey
,
json
);
}
...
...
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