|
@@ -2,6 +2,7 @@ package com.cyksj.web.controller.manage.group;
|
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.common.annotation.Log;
|
|
import com.cyksj.common.annotation.Log;
|
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
@@ -141,6 +142,15 @@ public class CmsGroupController {
|
|
|
if (goodsDonSkuView == null) {
|
|
if (goodsDonSkuView == null) {
|
|
|
throw BusinessRuntimeException.getInstance("该车队规格不属于该账号平台");
|
|
throw BusinessRuntimeException.getInstance("该车队规格不属于该账号平台");
|
|
|
}
|
|
}
|
|
|
|
|
+ //账号是否已经添加过
|
|
|
|
|
+ if (!account.getAccount().contains("客服")) {
|
|
|
|
|
+ int count = accountService.count(Wrappers.lambdaQuery(Account.class)
|
|
|
|
|
+ .eq(Account::getAccount, account.getAccount())
|
|
|
|
|
+ .eq(Account::getGoodsId, account.getGoodsId()));
|
|
|
|
|
+ if (count > 0) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("该平台下已生成该账号");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
accountService.save(account);
|
|
accountService.save(account);
|
|
|
groupsTrips.setAccountId(account.getId());
|
|
groupsTrips.setAccountId(account.getId());
|
|
|
groupService.setAccount(groupsTrips);
|
|
groupService.setAccount(groupsTrips);
|