Commit 3cb35853 authored by hezhen's avatar hezhen

123

parent 370cc44a
......@@ -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
}
......@@ -53,4 +53,14 @@ public class DataController {
}
return ObjectRestResponse.succ();
}
@GetMapping("/clearRelationphone")
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);
}
return ObjectRestResponse.succ();
}
}
\ No newline at end of file
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