Commit 5d358241 by guojuxing

品牌并入调整:如果没有关联品牌,也允许并入

parent 0024f296
......@@ -265,13 +265,9 @@ public class PlatformBrandApiServiceImpl implements PlatformBrandApiService {
if (fromBrandIds.contains(platformBrand.getPlatformBrandId())) {
return ServiceResponse.failure(ErrorCode.OPERATION_FAILED.getCode(), "目标品牌存在在源品牌中,请重新选择品牌");
}
Integer line = this.platformBrandRefService.updateRefs(fromBrandIds, platformBrand.getPlatformBrandId());
if (line > 0) {
Integer ids = platformBrandService.delBrandByIds(fromBrandIds);
logger.info("删除平台品牌数量:{}", ids);
return ServiceResponse.success();
} else {
return ServiceResponse.failure(ErrorCode.NOTEXISTS.getCode(), ErrorCode.NOTEXISTS.getMsg());
}
this.platformBrandRefService.updateRefs(fromBrandIds, platformBrand.getPlatformBrandId());
Integer ids = platformBrandService.delBrandByIds(fromBrandIds);
logger.info("删除平台品牌数量:{}", ids);
return ServiceResponse.success();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment