|
@@ -98,14 +98,14 @@ public class SaasProductController {
|
|
// 验证产品名称、产品编码的唯一性
|
|
// 验证产品名称、产品编码的唯一性
|
|
boolean result = false;
|
|
boolean result = false;
|
|
if (StringUtil.isNotBlank(model.getProductCode())) {
|
|
if (StringUtil.isNotBlank(model.getProductCode())) {
|
|
- result = this.saasProductService.validProductCode(model.getProductType(), model.getProductCode(), null);
|
|
|
|
|
|
+ result = this.saasProductService.validProductCode(model.getAppId(), model.getProductType(), model.getProductCode(), null);
|
|
if (!result) {
|
|
if (!result) {
|
|
return ResponseResultUtil.errorResult(ResponseCode.C0341.getCode(), "产品编码已存在");
|
|
return ResponseResultUtil.errorResult(ResponseCode.C0341.getCode(), "产品编码已存在");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- result = this.saasProductService.validProductName(model.getProductType(), model.getProductName(), null);
|
|
|
|
- if (!result) {
|
|
|
|
- return ResponseResultUtil.errorResult(ResponseCode.C0341.getCode(), "产品名称已存在");
|
|
|
|
|
|
+ String msg = this.saasProductService.validProductName(model.getAppId(), model.getProductType(),model.getProductName(), model.getId());
|
|
|
|
+ if (StringUtil.isNotBlank(msg)) {
|
|
|
|
+ return ResponseResultUtil.errorResult(ResponseCode.C0341.getCode(), msg);
|
|
}
|
|
}
|
|
SaasProduct saasProduct = new SaasProduct();
|
|
SaasProduct saasProduct = new SaasProduct();
|
|
BeanUtils.copyProperties(model, saasProduct);
|
|
BeanUtils.copyProperties(model, saasProduct);
|
|
@@ -133,14 +133,14 @@ public class SaasProductController {
|
|
// 验证产品名称、产品编码的唯一性
|
|
// 验证产品名称、产品编码的唯一性
|
|
boolean result = false;
|
|
boolean result = false;
|
|
if (StringUtil.isNotBlank(model.getProductCode())) {
|
|
if (StringUtil.isNotBlank(model.getProductCode())) {
|
|
- result = this.saasProductService.validProductCode(model.getProductType(), model.getProductCode(), null);
|
|
|
|
|
|
+ result = this.saasProductService.validProductCode(model.getAppId(), model.getProductType(), model.getProductCode(), null);
|
|
if (!result) {
|
|
if (!result) {
|
|
return ResponseResultUtil.errorResult(ResponseCode.C0341.getCode(), "产品编码已存在");
|
|
return ResponseResultUtil.errorResult(ResponseCode.C0341.getCode(), "产品编码已存在");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- result = this.saasProductService.validProductName(model.getProductType(),model.getProductName(), model.getId());
|
|
|
|
- if (!result) {
|
|
|
|
- return ResponseResultUtil.errorResult(ResponseCode.C0341.getCode(), "产品名称已存在");
|
|
|
|
|
|
+ String msg = this.saasProductService.validProductName(model.getAppId(), model.getProductType(),model.getProductName(), model.getId());
|
|
|
|
+ if (StringUtil.isNotBlank(msg)) {
|
|
|
|
+ return ResponseResultUtil.errorResult(ResponseCode.C0341.getCode(), msg);
|
|
}
|
|
}
|
|
SaasProduct saasProduct = new SaasProduct();
|
|
SaasProduct saasProduct = new SaasProduct();
|
|
BeanUtils.copyProperties(model, saasProduct);
|
|
BeanUtils.copyProperties(model, saasProduct);
|