Commit 7d0f5d48 authored by jiaorz's avatar jiaorz

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

parents 2dd553e9 0049ace0
......@@ -249,6 +249,18 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> {
return phoneAndUserIdMap;
}
public Map<String, Integer> findPhoneAndUserIdMapByPhonesForDel(List<String> phones) {
Example example = new Example(AppUserLogin.class);
Example.Criteria criteria = example.createCriteria();
criteria.andIn("username",phones);
List<AppUserLogin> appUserLogins = mapper.selectByExample(example);
Map<String, Integer> phoneAndUserIdMap = null;
if (CollectionUtils.isNotEmpty(appUserLogins)) {
phoneAndUserIdMap = appUserLogins.parallelStream().collect(Collectors.toMap(AppUserLogin::getUsername, AppUserLogin::getId));
}
return phoneAndUserIdMap;
}
public Map<Integer, AppUserLogin> findUserIdAndUserLoginMapByMemberIds(List<Integer> memberIds) {
Map<Integer, AppUserLogin> userIdAndAppUserLoginMap = new HashMap<>();
List<AppUserLogin> appUserLogins = mapper.selectByIdList(memberIds);
......
......@@ -52,7 +52,7 @@ public class DataController {
@GetMapping("/clearwithphone")
public ObjectRestResponse<Void> clearData(@RequestParam("phones") List<String> phons) {
Map<String, Integer> phoneAndUserIdMapByPhones = appUserLoginBiz.findPhoneAndUserIdMapByPhones(phons);
Map<String, Integer> phoneAndUserIdMapByPhones = appUserLoginBiz.findPhoneAndUserIdMapByPhonesForDel(phons);
if (Objects.nonNull(phoneAndUserIdMapByPhones)) {
Collection<Integer> userIds = phoneAndUserIdMapByPhones.values();
//1.删除登录表信息
......@@ -80,7 +80,7 @@ public class DataController {
@GetMapping("/clear_relation_withphone")
public ObjectRestResponse<Void> clearRelationphone(@RequestParam("phones") List<String> phons) {
Map<String, Integer> phoneAndUserIdMapByPhones = appUserLoginBiz.findPhoneAndUserIdMapByPhones(phons);
Map<String, Integer> phoneAndUserIdMapByPhones = appUserLoginBiz.findPhoneAndUserIdMapByPhonesForDel(phons);
if (Objects.nonNull(phoneAndUserIdMapByPhones)) {
Collection<Integer> userIds = phoneAndUserIdMapByPhones.values();
appUserRelationBiz.deleteByMemberIds(userIds);
......
......@@ -74,4 +74,10 @@ public class UsableVeicleDTO extends PageParam {
this.endDate = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endDateTamp), ZoneOffset.ofHours(8)));
this.endDateExtend = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(endDateTamp), ZoneOffset.ofHours(8)).plusDays(1L));
}
// private Boolean isTest;
//
// private Integer testCompanyId;
//
// private Integer testModelId;
}
\ 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