模板导入功能
This commit is contained in:
@@ -14,10 +14,8 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
@@ -38,10 +36,9 @@ public class CsDevModelController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addModel")
|
||||
@ApiOperation("新增设备模板")
|
||||
@ApiImplicitParam(name = "devModelParam", value = "设备模板参数", required = true)
|
||||
public HttpResult<String> addModel(@RequestBody @Validated DevModelParam devModelParam){
|
||||
public HttpResult<String> addModel(@RequestPart("file") @Validated MultipartFile file){
|
||||
String methodDescribe = getMethodDescribe("addModel");
|
||||
csDevModelService.addModel(devModelParam);
|
||||
csDevModelService.addModel(file);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user