mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
处理更新的时候的机台模板id验证
This commit is contained in:
+3
-2
@@ -1,5 +1,6 @@
|
||||
package com.cf.imes.module.system.controller.admin.machine;
|
||||
|
||||
import com.cf.imes.framework.es.core.valid.CreateGroup;
|
||||
import com.cf.imes.framework.es.core.valid.UpdateGroup;
|
||||
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
||||
import com.cf.imes.module.system.controller.admin.machine.vo.*;
|
||||
@@ -40,7 +41,7 @@ public class MachineController {
|
||||
@Operation(summary = "创建机台")
|
||||
@PreAuthorize("@ss.hasPermission('machine::create')")
|
||||
@OperateLog(logArgs = false)
|
||||
public CommonResult<Long> createCutting(@Valid @RequestBody CuttingSaveReqVO createReqVO) {
|
||||
public CommonResult<Long> createCutting(@Validated(CreateGroup.class) @RequestBody CuttingSaveReqVO createReqVO) {
|
||||
return success(machineService.createCutting(createReqVO));
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ public class MachineController {
|
||||
@Operation(summary = "更新机台")
|
||||
@PreAuthorize("@ss.hasPermission('machine::update')")
|
||||
@OperateLog(logArgs = false)
|
||||
public CommonResult<Boolean> update( @RequestBody @Validated(UpdateGroup.class) CuttingSaveReqVO updateReqVO) {
|
||||
public CommonResult<Boolean> update(@Validated(UpdateGroup.class) @RequestBody CuttingSaveReqVO updateReqVO) {
|
||||
machineService.updateCutting(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
+2
-3
@@ -1,12 +1,11 @@
|
||||
package com.cf.imes.module.system.controller.admin.machine.vo;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cf.imes.framework.es.core.valid.CreateGroup;
|
||||
import com.cf.imes.framework.es.core.valid.UpdateGroup;
|
||||
import com.cf.imes.module.system.dal.dataobject.machine.CuttingSettingDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@@ -34,7 +33,7 @@ public class CuttingSaveReqVO {
|
||||
private Long labelId;
|
||||
|
||||
@Schema(description = "机台模板id")
|
||||
@NotNull(message = "机台模板id")
|
||||
@NotNull(groups = CreateGroup.class, message = "机台模板id不能空")
|
||||
private Long templateId;
|
||||
|
||||
/* @Schema(description = "机台配置")
|
||||
|
||||
Reference in New Issue
Block a user