|
@@ -14,6 +14,7 @@ import javax.annotation.Resource;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
import static com.citu.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
import static com.citu.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
|
+import static com.citu.module.menduner.system.enums.ErrorCodeConstants.ENTERPRISE_PACKAGE_DEFAULT_PACKAGE_NOT_DELETE;
|
|
import static com.citu.module.menduner.system.enums.ErrorCodeConstants.ENTERPRISE_PACKAGE_NOT_EXISTS;
|
|
import static com.citu.module.menduner.system.enums.ErrorCodeConstants.ENTERPRISE_PACKAGE_NOT_EXISTS;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -52,6 +53,10 @@ public class EnterprisePackageServiceImpl implements EnterprisePackageService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void deleteEnterprisePackage(Long id) {
|
|
public void deleteEnterprisePackage(Long id) {
|
|
|
|
+ EnterprisePackageDO enterprisePackageDO = mapper.selectById(id);
|
|
|
|
+ if(enterprisePackageDO.getDefaultPackage()){
|
|
|
|
+ throw exception(ENTERPRISE_PACKAGE_DEFAULT_PACKAGE_NOT_DELETE);
|
|
|
|
+ }
|
|
// 校验存在
|
|
// 校验存在
|
|
validateEnterprisePackageExists(id);
|
|
validateEnterprisePackageExists(id);
|
|
// 删除
|
|
// 删除
|