提交 9d7093eb authored 作者: mry's avatar mry

fix(base): 修改了生成报告的名称,xml文件中的表名

上级 2892e4fa
......@@ -12,6 +12,8 @@ import org.testng.*;
import org.testng.xml.XmlSuite;
import java.io.File;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
/**
......@@ -19,9 +21,11 @@ import java.util.*;
*/
public class ExtentTestNgReporterListener implements IReporter {
private static final LocalDateTime TIME = LocalDateTime.now();
private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd-HH-mm-ss");
private static final String STRING = DATE_TIME_FORMATTER.format(TIME);
private static final String OUTPUT_FOLDER = System.getProperty("user.dir") + "/";
private static final String FILE_NAME = "testNg.html";
private static final String FILE_NAME = STRING + "-testNg.html";
private ExtentReports extent;
@Override
......
......@@ -3,7 +3,7 @@
<suite name="Pigeon Api测试" parallel="false">
<test name="xxx-xxx-service">
<parameter name="sql" value="select id from test_case"/>
<parameter name="sql" value="select id from kt_test_case"/>
<parameter name="envId" value="1"/>
<parameter name="projectId" value="1"/>
<classes>
......
......@@ -14,6 +14,5 @@ spring:
mybatis-plus:
type-enums-package: org.matrix.enums
baseJsPath: syntaxCheck.js
baseJsPath: syntaxCheck.js
\ No newline at end of file
......@@ -126,10 +126,17 @@ public class MoveController {
@PutMapping
public ResponseEntity<CommonResultObj<MoveAction>> updateMoveAction(@RequestBody MoveAction moveAction) {
Boolean moveBoolean = Optional.of(moveService.updateById(moveAction.getMove()))
.orElseThrow(GlobalException::new);
Boolean delete = Optional.of(actionService.remove(Wrappers.lambdaQuery(Action.class)
.eq(Action::getMoveId, moveAction.getMove().getId())))
.orElseThrow(() -> new GlobalException("删除失败"));
Long id = moveAction.getMove().getId();
moveAction.getAction().forEach(
action -> action.setMoveId(id)
);
Boolean saveOrUpdate = Optional.of(actionService.saveOrUpdateBatch(moveAction.getAction()))
.orElseThrow(() -> new GlobalException("修改失败"));
Boolean actionBoolean = Optional.of(actionService.saveOrUpdateBatch(moveAction.getAction()))
.orElseThrow(() -> new GlobalException("修改失败"));
return moveBoolean || actionBoolean
return moveBoolean && saveOrUpdate && delete
? CommonResult.success(moveAction, "修改成功")
: CommonResult.failed(moveAction, "修改失败");
}
......
......@@ -15,8 +15,8 @@ spring:
password: root
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
type-enums-package: org.matrix.enums
baseJsPath: syntaxCheck.js
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论