|
@@ -560,7 +560,7 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public void batchDelAccountTripsByGoodsAccount(DelAccountTripsReq delAccountTripsReq, long adminId) throws Exception {
|
|
|
|
|
|
|
+ public List<String> batchDelAccountTripsByGoodsAccount(DelAccountTripsReq delAccountTripsReq, long adminId) throws Exception {
|
|
|
CmsUser cmsUser = cmsUserMapper.selectById(adminId);
|
|
CmsUser cmsUser = cmsUserMapper.selectById(adminId);
|
|
|
Integer goodsId = delAccountTripsReq.getGoodsId();
|
|
Integer goodsId = delAccountTripsReq.getGoodsId();
|
|
|
List<String> accounts = delAccountTripsReq.getAccounts();
|
|
List<String> accounts = delAccountTripsReq.getAccounts();
|
|
@@ -568,11 +568,14 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
|
|
|
GoodsDon goodsDon = goodsDonMapper.selectById(goodsId);
|
|
GoodsDon goodsDon = goodsDonMapper.selectById(goodsId);
|
|
|
Assert.notNull(goodsDon,"平台不存在");
|
|
Assert.notNull(goodsDon,"平台不存在");
|
|
|
|
|
|
|
|
|
|
+ List<String> fails = new ArrayList<>();
|
|
|
|
|
+
|
|
|
if (CollUtil.isNotEmpty(accounts)) {
|
|
if (CollUtil.isNotEmpty(accounts)) {
|
|
|
DelAccountRecord delAccountRecord = null;
|
|
DelAccountRecord delAccountRecord = null;
|
|
|
for (String account : accounts) {
|
|
for (String account : accounts) {
|
|
|
Account dbAccount = accountMapper.selectOne(Wrappers.lambdaQuery(Account.class).eq(Account::getAccount, account.trim()).eq(Account::getGoodsId, goodsId));
|
|
Account dbAccount = accountMapper.selectOne(Wrappers.lambdaQuery(Account.class).eq(Account::getAccount, account.trim()).eq(Account::getGoodsId, goodsId));
|
|
|
if (dbAccount == null) {
|
|
if (dbAccount == null) {
|
|
|
|
|
+ fails.add(account);
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
@@ -584,6 +587,7 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
|
|
|
.ne(GroupsRelation::getUserId, 0));
|
|
.ne(GroupsRelation::getUserId, 0));
|
|
|
//车队上存在用户不删除 下个循环
|
|
//车队上存在用户不删除 下个循环
|
|
|
if (selectCount > 0) {
|
|
if (selectCount > 0) {
|
|
|
|
|
+ fails.add(account);
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
groupsMapper.deleteById(groupsTrips.getId());
|
|
groupsMapper.deleteById(groupsTrips.getId());
|
|
@@ -599,5 +603,6 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
|
|
|
accountMapper.deleteById(dbAccount.getId());
|
|
accountMapper.deleteById(dbAccount.getId());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ return fails;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|