提交 034abade authored 作者: mry's avatar mry

fix(web): 修复了无法删除默认环境的bug

上级 b9a996a7
...@@ -61,7 +61,7 @@ todo ...@@ -61,7 +61,7 @@ todo
可以进行接口测试的接口用多少(给出一个大概百分比) 是可以使用 自动化测试平台测试的? 可以进行接口测试的接口用多少(给出一个大概百分比) 是可以使用 自动化测试平台测试的?
在测试的过程中,有哪些功能点可以进行优化? 在测试的过程中,有哪些功能点可以进行优化?
- 会议智能管理系统总接口数141个, - 会议智能管理系统总接口数141个,目前自动测试可以覆盖的接口大概20%
需要测试的: 需要测试的:
......
package org.matrix.database.entity; package org.matrix.database.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -48,6 +50,7 @@ public class TestCase extends BaseEntity { ...@@ -48,6 +50,7 @@ public class TestCase extends BaseEntity {
@ApiModelProperty("用例描述") @ApiModelProperty("用例描述")
private String des; private String des;
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ApiModelProperty("默认环境Id") @ApiModelProperty("默认环境Id")
private Long defaultEnv; private Long defaultEnv;
......
...@@ -151,7 +151,9 @@ public class MoveController { ...@@ -151,7 +151,9 @@ public class MoveController {
put = {@CachePut(cacheNames = "moveNames", key = "#result.body.data.move.id", put = {@CachePut(cacheNames = "moveNames", key = "#result.body.data.move.id",
condition = "#p0 != null", unless = "#result.statusCodeValue != 200") condition = "#p0 != null", unless = "#result.statusCodeValue != 200")
}, },
evict = {@CacheEvict(cacheNames = "movePageName", allEntries = true)}) evict = {
@CacheEvict(cacheNames = "movePageName", allEntries = true, condition = "#p0 != null "),
@CacheEvict(cacheNames = "moveNames", key = "#p0.move.id", condition = "#p0 != null ")})
public ResponseEntity<CommonResultObj<MoveAction>> insertMoveAction(@RequestBody MoveAction moveAction) { public ResponseEntity<CommonResultObj<MoveAction>> insertMoveAction(@RequestBody MoveAction moveAction) {
Boolean moveBoolean = Optional.of(moveService.save(moveAction.getMove())) Boolean moveBoolean = Optional.of(moveService.save(moveAction.getMove()))
.orElseThrow(GlobalException::new); .orElseThrow(GlobalException::new);
......
...@@ -139,7 +139,9 @@ public class TestCaseController { ...@@ -139,7 +139,9 @@ public class TestCaseController {
put = {@CachePut(cacheNames = "caseCache", key = "#result.body.data.testCase.id", put = {@CachePut(cacheNames = "caseCache", key = "#result.body.data.testCase.id",
condition = "#p0 !=null", unless = "#result.statusCodeValue != 200") condition = "#p0 !=null", unless = "#result.statusCodeValue != 200")
}, },
evict = {@CacheEvict(cacheNames = "casePageCache", allEntries = true)}) evict = {
@CacheEvict(cacheNames = "casePageCache", allEntries = true, condition = "#p0 != null "),
@CacheEvict(cacheNames = "caseCache", key = "#p0.testCase.id", condition = "#p0 != null ")})
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<CommonResultObj<TestCaseData>> insertTestCaseData(@RequestBody TestCaseData testCaseData) { public ResponseEntity<CommonResultObj<TestCaseData>> insertTestCaseData(@RequestBody TestCaseData testCaseData) {
Boolean testCaseBoolean = Optional.of(testCaseService.saveOrUpdate(testCaseData.getTestCase())) Boolean testCaseBoolean = Optional.of(testCaseService.saveOrUpdate(testCaseData.getTestCase()))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论