|
|
@ -61,6 +61,10 @@ public class InterfaceBackServiceImpl extends ServiceImpl<InterfaceBackMapper, I |
|
|
|
|
|
|
|
@Override |
|
|
|
public void create(InterfaceBack dto) { |
|
|
|
InterfaceBack one = findByCode(dto.getInterface_name()); |
|
|
|
if (ObjectUtil.isNotEmpty(one)) { |
|
|
|
throw new BadRequestException("接口重复!"); |
|
|
|
} |
|
|
|
dto.setInterface_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
|
|
|
String result = Arrays.toString(dto.getProduct_areas()); |
|
|
|
result = result.replaceAll(" ", ""); |
|
|
@ -74,6 +78,10 @@ public class InterfaceBackServiceImpl extends ServiceImpl<InterfaceBackMapper, I |
|
|
|
if (entity == null) { |
|
|
|
throw new BadRequestException("被删除或无权限,操作失败!"); |
|
|
|
} |
|
|
|
InterfaceBack one = findByCode(dto.getInterface_name()); |
|
|
|
if (ObjectUtil.isNotEmpty(one) && !one.getInterface_id().equals(dto.getInterface_id())) { |
|
|
|
throw new BadRequestException("接口重复!"); |
|
|
|
} |
|
|
|
String result = Arrays.toString(dto.getProduct_areas()); |
|
|
|
result = result.replaceAll(" ", ""); |
|
|
|
dto.setProduct_area(result); |
|
|
|