|
@@ -8,12 +8,14 @@ import com.uas.platform.b2c.external.erp.product.service.OperationInfoService;
|
|
|
import com.uas.platform.b2c.prod.product.brand.modal.Brand;
|
|
import com.uas.platform.b2c.prod.product.brand.modal.Brand;
|
|
|
import com.uas.platform.b2c.prod.product.brand.modal.BrandSubmit;
|
|
import com.uas.platform.b2c.prod.product.brand.modal.BrandSubmit;
|
|
|
import com.uas.platform.b2c.prod.product.brand.service.BrandSubmitService;
|
|
import com.uas.platform.b2c.prod.product.brand.service.BrandSubmitService;
|
|
|
|
|
+import com.uas.platform.core.exception.IllegalOperatorException;
|
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.model.PageParams;
|
|
import com.uas.platform.core.model.PageParams;
|
|
|
import com.uas.platform.core.model.ServiceCode;
|
|
import com.uas.platform.core.model.ServiceCode;
|
|
|
import com.uas.platform.core.model.Status;
|
|
import com.uas.platform.core.model.Status;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.dao.DataIntegrityViolationException;
|
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
@@ -170,6 +172,11 @@ public class BrandSubmitController {
|
|
|
public Brand audituUpdate(@RequestBody String json) {
|
|
public Brand audituUpdate(@RequestBody String json) {
|
|
|
BrandSubmit brandSubmit = FastjsonUtils.fromJson(json, BrandSubmit.class);
|
|
BrandSubmit brandSubmit = FastjsonUtils.fromJson(json, BrandSubmit.class);
|
|
|
logger.log("品牌维护", "审核通过冲突品牌申请", "审核通过与现版本信息冲突的品牌申请", brandSubmit.getNameCn(), brandSubmit.getId());
|
|
logger.log("品牌维护", "审核通过冲突品牌申请", "审核通过与现版本信息冲突的品牌申请", brandSubmit.getNameCn(), brandSubmit.getId());
|
|
|
- return brandSubmitService.audituUpdate(brandSubmit);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ Brand brand = brandSubmitService.audituUpdate(brandSubmit);
|
|
|
|
|
+ return brand;
|
|
|
|
|
+ } catch (DataIntegrityViolationException e) {
|
|
|
|
|
+ throw new IllegalOperatorException("品牌已存在,请重新确认品牌信息");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|