Commit a2769275 authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/dev' into dev

parents 3d0879b0 056f807f
...@@ -306,11 +306,26 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel ...@@ -306,11 +306,26 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
Example example = new Example(AppUserRelation.class); Example example = new Example(AppUserRelation.class);
Example.Criteria criteria = example.createCriteria(); Example.Criteria criteria = example.createCriteria();
criteria.andIn("parentId",userIds); criteria.andIn("parentId",userIds);
List<AppUserRelation> list=mapper.selectByExample(example);
for (AppUserRelation appUserRelation:list){
getMyBiz().delRelation(appUserRelation.getUserId());
}
mapper.deleteByExample(example); mapper.deleteByExample(example);
Example example2 = new Example(AppUserRelation.class); Example example2 = new Example(AppUserRelation.class);
Example.Criteria criteria1 = example2.createCriteria(); Example.Criteria criteria1 = example2.createCriteria();
criteria1.andIn("userId",userIds); criteria1.andIn("userId",userIds);
mapper.deleteByExample(example2); mapper.deleteByExample(example2);
for (Integer userId:userIds){
getMyBiz().delRelation(userId);
}
} }
} @CacheClear(key="user:relation{1}")
\ No newline at end of file public void delRelation(Integer userId){
}
}
...@@ -7,11 +7,13 @@ import com.github.wxiaoqi.security.admin.biz.AppUserSellingWaterBiz; ...@@ -7,11 +7,13 @@ import com.github.wxiaoqi.security.admin.biz.AppUserSellingWaterBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.activity.feign.ActivityFeign; import com.xxfc.platform.activity.feign.ActivityFeign;
import org.springframework.beans.factory.annotation.Autowired; 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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.PostConstruct;
import java.util.*; import java.util.*;
/** /**
...@@ -20,10 +22,16 @@ import java.util.*; ...@@ -20,10 +22,16 @@ import java.util.*;
* @description * @description
* @data 2019/7/24 15:11 * @data 2019/7/24 15:11
*/ */
@ConditionalOnProperty(prefix = "data.clean", name = "enable",havingValue = "true")
@RestController @RestController
@RequestMapping("/app/unauth/user_data") @RequestMapping("/app/unauth/user_data")
public class DataController { public class DataController {
@PostConstruct
public void init(){
System.out.println("启动了****************************");
}
@Autowired @Autowired
private AppUserLoginBiz appUserLoginBiz; private AppUserLoginBiz appUserLoginBiz;
...@@ -55,12 +63,14 @@ public class DataController { ...@@ -55,12 +63,14 @@ public class DataController {
} }
@GetMapping("/clear_relation_withphone") @GetMapping("/clear_relation_withphone")
public ObjectRestResponse<Void> clearRelation(@RequestParam("phones") List<String> phones){ public ObjectRestResponse<Void> clearRelationphone(@RequestParam("phones") List<String> phons) {
Map<String, Integer> phoneAndUserIdMapByPhones = appUserLoginBiz.findPhoneAndUserIdMapByPhones(phones);
Map<String, Integer> phoneAndUserIdMapByPhones = appUserLoginBiz.findPhoneAndUserIdMapByPhones(phons);
if (Objects.nonNull(phoneAndUserIdMapByPhones)){ if (Objects.nonNull(phoneAndUserIdMapByPhones)){
Collection<Integer> userIds = phoneAndUserIdMapByPhones.values(); Collection<Integer> userIds = phoneAndUserIdMapByPhones.values();
appUserRelationBiz.deleteByMemberIds(userIds); appUserRelationBiz.deleteByMemberIds(userIds);
appUserSellingWaterBiz.deleteByMemberIds(userIds); appUserSellingWaterBiz.deleteByMemberIds(userIds);
} }
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
......
...@@ -12,9 +12,8 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -12,9 +12,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(scanBasePackages = { @SpringBootApplication(scanBasePackages = {
"com.xxfc.platform", "com.xxfc.platform",
"com.github.wxiaoqi.security.common.handler" "com.github.wxiaoqi.security.common.handler",
// , "com.github.wxiaoqi.security.common.log"
// "com.github.wxiaoqi.security.common.log"
}) })
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableScheduling @EnableScheduling
......
...@@ -435,24 +435,27 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> { ...@@ -435,24 +435,27 @@ 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(){{ // SendMsgDTO sendMsgDTO = new SendMsgDTO(){{
setExchange(ORDER_TOPIC); // setExchange(ORDER_TOPIC);
}}; // }};
sendMsgDTO.setJson(JSONUtil.toJsonStr(orderMQDTO)); // sendMsgDTO.setJson(JSONUtil.toJsonStr(orderMQDTO));
switch (sign) { switch (sign) {
case 2: case 2:
sendMsgDTO.setRoutKey(KEY_ORDER_CANCEL); // sendMsgDTO.setRoutKey(KEY_ORDER_CANCEL);
mqSenderFeign.sendMessage(ORDER_TOPIC, KEY_ORDER_CANCEL, JSONUtil.toJsonStr(orderMQDTO));
break; break;
case 4: case 4:
sendMsgDTO.setRoutKey(KEY_ORDER_PAY); // sendMsgDTO.setRoutKey(KEY_ORDER_PAY);
mqSenderFeign.sendMessage(ORDER_TOPIC, KEY_ORDER_PAY, JSONUtil.toJsonStr(orderMQDTO));
break; break;
case 6: case 6:
sendMsgDTO.setRoutKey(KEY_ORDER_FINLISH); // sendMsgDTO.setRoutKey(KEY_ORDER_FINLISH);
mqSenderFeign.sendMessage(ORDER_TOPIC, KEY_ORDER_FINLISH, JSONUtil.toJsonStr(orderMQDTO));
break; break;
default: default:
break; break;
} }
mqSenderFeign.postSendMessage(BeanUtil.beanToMap(sendMsgDTO, Boolean.FALSE, Boolean.TRUE)); // 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);
} }
......
...@@ -14,7 +14,7 @@ public class MQSenderController { ...@@ -14,7 +14,7 @@ public class MQSenderController {
private MQServiceBiZ mqServiceBiZ; private MQServiceBiZ mqServiceBiZ;
@GetMapping(value = "/sendMessage") @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); return mqServiceBiZ.sendMessage(exchange, routKey, json);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment