提交 2892e4fa authored 作者: mry's avatar mry

fix(base): 修改了主键id类型

上级 20acdede
...@@ -28,10 +28,10 @@ public class Action extends BaseEntity { ...@@ -28,10 +28,10 @@ public class Action extends BaseEntity {
private String name; private String name;
@ApiModelProperty("行为ID") @ApiModelProperty("行为ID")
private Integer moveId; private Long moveId;
@ApiModelProperty("项目ID") @ApiModelProperty("项目ID")
private Integer projectId; private Long projectId;
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
......
...@@ -19,7 +19,7 @@ import org.matrix.actuators.datasource.DataSourceDTO; ...@@ -19,7 +19,7 @@ import org.matrix.actuators.datasource.DataSourceDTO;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Connect对象", description = "") @ApiModel(value = "Connect对象", description = "数据库")
@TableName(value = "kt_connect") @TableName(value = "kt_connect")
public class Connect extends BaseEntity { public class Connect extends BaseEntity {
......
...@@ -22,12 +22,12 @@ import org.matrix.enums.DynamicVarType; ...@@ -22,12 +22,12 @@ import org.matrix.enums.DynamicVarType;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DynamicVariable对象", description = "") @ApiModel(value = "DynamicVariable对象", description = "动参")
@TableName(value = "kt_dynamic_variable") @TableName(value = "kt_dynamic_variable")
public class DynamicVariable extends BaseEntity { public class DynamicVariable extends BaseEntity {
@ApiModelProperty("所属项目") @ApiModelProperty("所属项目")
private Integer projectId; private Long projectId;
@ApiModelProperty("取用字段") @ApiModelProperty("取用字段")
private String takenField; private String takenField;
......
...@@ -35,7 +35,7 @@ public class Environment extends BaseEntity { ...@@ -35,7 +35,7 @@ public class Environment extends BaseEntity {
private String parameterName; private String parameterName;
@ApiModelProperty("项目ID") @ApiModelProperty("项目ID")
private Integer projectId; private Long projectId;
@ApiModelProperty("静态变量,以JSON的形式存储,例如({\"name\":\"张三\"})") @ApiModelProperty("静态变量,以JSON的形式存储,例如({\"name\":\"张三\"})")
@TableField(typeHandler = FastjsonTypeHandler.class) @TableField(typeHandler = FastjsonTypeHandler.class)
......
...@@ -17,7 +17,7 @@ import lombok.*; ...@@ -17,7 +17,7 @@ import lombok.*;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Move对象", description = "") @ApiModel(value = "Move对象", description = "行为")
@TableName(value = "kt_move") @TableName(value = "kt_move")
public class Move extends BaseEntity { public class Move extends BaseEntity {
...@@ -25,7 +25,7 @@ public class Move extends BaseEntity { ...@@ -25,7 +25,7 @@ public class Move extends BaseEntity {
private String name; private String name;
@ApiModelProperty("所属项目") @ApiModelProperty("所属项目")
private Integer projectId; private Long projectId;
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
......
...@@ -17,7 +17,7 @@ import lombok.*; ...@@ -17,7 +17,7 @@ import lombok.*;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Project对象", description = "") @ApiModel(value = "Project对象", description = "项目")
@TableName(value = "kt_project") @TableName(value = "kt_project")
public class Project extends BaseEntity { public class Project extends BaseEntity {
......
...@@ -18,14 +18,14 @@ import lombok.*; ...@@ -18,14 +18,14 @@ import lombok.*;
@AllArgsConstructor @AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName("kt_test_case") @TableName("kt_test_case")
@ApiModel(value = "TestCase对象", description = "") @ApiModel(value = "TestCase对象", description = "用例")
public class TestCase extends BaseEntity { public class TestCase extends BaseEntity {
@ApiModelProperty("名称") @ApiModelProperty("名称")
private String name; private String name;
@ApiModelProperty("所属项目") @ApiModelProperty("所属项目")
private Integer projectId; private Long projectId;
@ApiModelProperty("用例类型 1为http") @ApiModelProperty("用例类型 1为http")
private Integer type; private Integer type;
......
...@@ -87,9 +87,7 @@ public class MoveController { ...@@ -87,9 +87,7 @@ public class MoveController {
.eq(Action::getMoveId, moveId))) .eq(Action::getMoveId, moveId)))
.orElse(new ArrayList<>()); .orElse(new ArrayList<>());
MoveAction ma = new MoveAction(move, actionList); MoveAction ma = new MoveAction(move, actionList);
return ma != null return CommonResult.success(ma, "查询成功");
? CommonResult.success(ma, "查询成功")
: CommonResult.failed(ma, "查询失败或无数据");
} }
/** /**
...@@ -103,7 +101,7 @@ public class MoveController { ...@@ -103,7 +101,7 @@ public class MoveController {
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);
Integer id = Math.toIntExact(moveAction.getMove().getId()); Long id = moveAction.getMove().getId();
if (moveAction.getAction().size() != 0) { if (moveAction.getAction().size() != 0) {
for (Action action : moveAction.getAction()) { for (Action action : moveAction.getAction()) {
action.setMoveId(id); action.setMoveId(id);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论