Commit 9fdf47eb by zhiwj

去掉判断

parent 40668b22
......@@ -50,10 +50,10 @@ public class StoreBrandApiServiceImpl implements StoreBrandApiService {
@Override
public ServiceResponse<Integer> saveOrUpdateStoreBrand(StoreBrandDTO storeBrandDTO) {
Integer storeBrandId;
int brandCodeCount = storeBrandService.countByStoreBrandCode(storeBrandDTO.getEnterpriseId(), storeBrandDTO.getStoreBrandCode(), storeBrandDTO.getStoreBrandId());
if (brandCodeCount > 0) {
return ServiceResponse.failure(ErrorCode.DATA_EXISTS.getCode(), "品牌code已存在");
}
// int brandCodeCount = storeBrandService.countByStoreBrandCode(storeBrandDTO.getEnterpriseId(), storeBrandDTO.getStoreBrandCode(), storeBrandDTO.getStoreBrandId());
// if (brandCodeCount > 0) {
// return ServiceResponse.failure(ErrorCode.DATA_EXISTS.getCode(), "品牌code已存在");
// }
int storeBrandName = storeBrandService.countByStoreBrandName(storeBrandDTO.getEnterpriseId(), storeBrandDTO.getStoreBrandName(), storeBrandDTO.getStoreBrandId());
if (storeBrandName > 0) {
return ServiceResponse.failure(ErrorCode.DATA_EXISTS.getCode(), "品牌名称已存在");
......
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