update 功能安全中心代码
This commit is contained in:
+4
@@ -5,4 +5,8 @@ package com.jero.functionalsafetycenter.common;
|
|||||||
* @date 2024-06-25 10:10
|
* @date 2024-06-25 10:10
|
||||||
*/
|
*/
|
||||||
public class SafetyCenterCommon {
|
public class SafetyCenterCommon {
|
||||||
|
|
||||||
|
public static final int PROJECT_TYPE_1 = 1;
|
||||||
|
public static final int PROJECT_TYPE_2 = 2;
|
||||||
|
public static final int PROJECT_TYPE_3 = 3;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -70,8 +70,8 @@ public class SafetyCenterController extends JeroController<SafetyCenter, SafetyC
|
|||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "功能安全中心-添加")
|
@AutoLog(value = "功能安全中心-添加研究组")
|
||||||
@ApiOperation(value = "功能安全中心-添加", notes = "功能安全中心-添加")
|
@ApiOperation(value = "功能安全中心-添加研究组", notes = "功能安全中心-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@Validated @RequestBody SafetyCenter safetyCenter) {
|
public Result<String> add(@Validated @RequestBody SafetyCenter safetyCenter) {
|
||||||
safetyCenterService.add(safetyCenter);
|
safetyCenterService.add(safetyCenter);
|
||||||
|
|||||||
+2
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.functionalsafetycenter.service;
|
package com.jero.functionalsafetycenter.service;
|
||||||
|
|
||||||
|
import com.jero.functionalsafetycenter.common.SafetyCenterCommon;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -14,6 +15,7 @@ import com.jero.functionalsafetycenter.mapper.SafetyCenterMapper;
|
|||||||
@Service
|
@Service
|
||||||
public class SafetyCenterService extends ServiceImpl<SafetyCenterMapper, SafetyCenter> {
|
public class SafetyCenterService extends ServiceImpl<SafetyCenterMapper, SafetyCenter> {
|
||||||
public void add(SafetyCenter safetyCenter) {
|
public void add(SafetyCenter safetyCenter) {
|
||||||
|
safetyCenter.setProjectType(SafetyCenterCommon.PROJECT_TYPE_2);
|
||||||
this.save(safetyCenter);
|
this.save(safetyCenter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user