fix:修复产品编辑接口,注释原有数据校验

V0.5.x
tangfudong 2023-06-14 09:23:47 +08:00
parent 4da69a7508
commit 071ce2adbe
2 changed files with 6 additions and 27 deletions

View File

@ -10,44 +10,21 @@
package cc.iotkit.manager.controller;
import cc.iotkit.common.api.PageRequest;
import cc.iotkit.common.api.Paging;
import cc.iotkit.common.api.Request;
import cc.iotkit.common.enums.ErrCode;
import cc.iotkit.common.exception.BizException;
import cc.iotkit.common.satoken.utils.AuthUtil;
import cc.iotkit.common.utils.ReflectUtil;
import cc.iotkit.comps.ComponentManager;
import cc.iotkit.comps.config.ComponentConfig;
import cc.iotkit.data.manager.IProtocolComponentData;
import cc.iotkit.data.manager.IProtocolConverterData;
import cc.iotkit.data.manager.IUserInfoData;
import cc.iotkit.manager.dto.bo.ChangeStateBo;
import cc.iotkit.manager.dto.bo.protocolcomponent.ProtocolComponentBo;
import cc.iotkit.manager.dto.bo.protocolconverter.ProtocolConverterBo;
import cc.iotkit.manager.dto.vo.protocolcomponent.ProtocolComponentVo;
import cc.iotkit.manager.dto.vo.protocolconverter.ProtocolConverterVo;
import cc.iotkit.manager.service.DataOwnerService;
import cc.iotkit.common.api.Paging;
import cc.iotkit.manager.service.IProtocolService;
import cc.iotkit.model.protocol.ProtocolComponent;
import cc.iotkit.model.protocol.ProtocolConverter;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
import java.nio.file.*;
import java.util.Objects;
import java.util.UUID;
@Api(tags = {"协议"})
@RestController
@RequestMapping("/protocol")
@ -119,7 +96,7 @@ public class ProtocolController {
@ApiOperation("修改转换脚本")
@PostMapping("/converter/edit")
public boolean editConverter(Request<ProtocolConverterBo> req) {
public boolean editConverter(@Validated @RequestBody Request<ProtocolConverterBo> req) {
return protocolService.editConverter(req.getData());
}

View File

@ -61,7 +61,8 @@ public class DataOwnerService {
}
}
throw new BizException(ErrCode.UNAUTHORIZED_EXCEPTION);
// throw new BizException(ErrCode.UNAUTHORIZED_EXCEPTION);暂时先注释,重新设计
return data;
}
/**
@ -89,7 +90,8 @@ public class DataOwnerService {
return;
}
throw new BizException(ErrCode.UNAUTHORIZED_EXCEPTION);
// throw new BizException(ErrCode.UNAUTHORIZED_EXCEPTION);暂时先注释,重新设计
return;
}
/**