UI 自动化场景 场景步骤接口
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
package com.test.test.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.test.test.domain.UiAutomation;
|
||||
import com.test.test.domain.qo.UiAutomationDataQO;
|
||||
import com.test.test.domain.qo.UiAutomationQO;
|
||||
import com.test.test.service.IUiAutomationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.test.common.annotation.Log;
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.enums.BusinessType;
|
||||
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* ui自动化Controller
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test/automation")
|
||||
@Slf4j
|
||||
public class UiAutomationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUiAutomationService uiAutomationService;
|
||||
|
||||
/**
|
||||
* 查询ui自动化列表
|
||||
// */
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UiAutomationQO uiAutomation)
|
||||
{
|
||||
startPage();
|
||||
List<UiAutomation> list = uiAutomationService.selectUiAutomationList(uiAutomation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 导出ui自动化列表
|
||||
// */
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:export')")
|
||||
// @Log(title = "ui自动化", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, UiAutomation uiAutomation)
|
||||
// {
|
||||
// List<UiAutomation> list = uiAutomationService.selectUiAutomationList(uiAutomation);
|
||||
// ExcelUtil<UiAutomation> util = new ExcelUtil<UiAutomation>(UiAutomation.class);
|
||||
// util.exportExcel(response, list, "ui自动化数据");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取ui自动化详细信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:query')")
|
||||
@GetMapping(value = "getInfo/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(uiAutomationService.selectUiAutomationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增ui自动化
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:add')")
|
||||
@Log(title = "ui自动化", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody UiAutomationDataQO uiAutomationDataQO)
|
||||
{
|
||||
try{
|
||||
log.info("新增成功!");
|
||||
return success(uiAutomationService.insertUiAutomation(uiAutomationDataQO));
|
||||
}catch (Exception e){
|
||||
log.error("新增失败!",e);
|
||||
return error("新增失败!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改ui自动化
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:edit')")
|
||||
@Log(title = "ui自动化", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/update")
|
||||
public AjaxResult edit(@RequestBody UiAutomationDataQO uiAutomationDataQO)
|
||||
{
|
||||
try{
|
||||
log.info("修改成功!");
|
||||
return success(uiAutomationService.updateUiAutomation(uiAutomationDataQO));
|
||||
}catch (Exception e){
|
||||
log.error("修改失败!",e);
|
||||
return error("修改失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ui自动化
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:automation:remove')")
|
||||
@Log(title = "ui自动化", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("delete/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(uiAutomationService.deleteUiAutomationByIds(ids));
|
||||
}
|
||||
}
|
||||
232
test-test/src/main/java/com/test/test/domain/UiAutomation.java
Normal file
232
test-test/src/main/java/com/test/test/domain/UiAutomation.java
Normal file
@@ -0,0 +1,232 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui自动化对象 ui_automation
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public class UiAutomation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
@Excel(name = "模块id")
|
||||
private Long groupId;
|
||||
|
||||
/** 场景名称 */
|
||||
@Excel(name = "场景名称")
|
||||
private String name;
|
||||
|
||||
/** 用例等级 */
|
||||
@Excel(name = "用例等级")
|
||||
private String caseLevel;
|
||||
|
||||
/** 状态 未开始 进行中 已完成 */
|
||||
@Excel(name = "状态 1未开始 2进行中 3已完成")
|
||||
private String status;
|
||||
|
||||
/** 标签 */
|
||||
@Excel(name = "标签")
|
||||
private String label;
|
||||
|
||||
/** 责任人 */
|
||||
@Excel(name = "责任人")
|
||||
private String dutyBy;
|
||||
|
||||
/** 运行环境 */
|
||||
@Excel(name = "运行环境")
|
||||
private String runEnvironment;
|
||||
|
||||
/** 步骤数 */
|
||||
@Excel(name = "步骤数")
|
||||
private Integer stepsNumber;
|
||||
|
||||
/** 执行结果 */
|
||||
@Excel(name = "执行结果")
|
||||
private String executionResult;
|
||||
|
||||
/** 通过率 */
|
||||
@Excel(name = "通过率")
|
||||
private String passRate;
|
||||
|
||||
/** 定时任务表达式 */
|
||||
@Excel(name = "定时任务表达式")
|
||||
private String crontab;
|
||||
|
||||
/** 定时任务表达式状态 */
|
||||
@Excel(name = "定时任务表达式状态")
|
||||
private Integer crontabStatus;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/**描述*/
|
||||
private String description;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setGroupId(Long groupId)
|
||||
{
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public Long getGroupId()
|
||||
{
|
||||
return groupId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setCaseLevel(String caseLevel)
|
||||
{
|
||||
this.caseLevel = caseLevel;
|
||||
}
|
||||
|
||||
public String getCaseLevel()
|
||||
{
|
||||
return caseLevel;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setLabel(String label)
|
||||
{
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getLabel()
|
||||
{
|
||||
return label;
|
||||
}
|
||||
public void setDutyBy(String dutyBy)
|
||||
{
|
||||
this.dutyBy = dutyBy;
|
||||
}
|
||||
|
||||
public String getDutyBy()
|
||||
{
|
||||
return dutyBy;
|
||||
}
|
||||
public void setRunEnvironment(String runEnvironment)
|
||||
{
|
||||
this.runEnvironment = runEnvironment;
|
||||
}
|
||||
|
||||
public String getRunEnvironment()
|
||||
{
|
||||
return runEnvironment;
|
||||
}
|
||||
public void setStepsNumber(Integer stepsNumber)
|
||||
{
|
||||
this.stepsNumber = stepsNumber;
|
||||
}
|
||||
|
||||
public Integer getStepsNumber()
|
||||
{
|
||||
return stepsNumber;
|
||||
}
|
||||
public void setExecutionResult(String executionResult)
|
||||
{
|
||||
this.executionResult = executionResult;
|
||||
}
|
||||
|
||||
public String getExecutionResult()
|
||||
{
|
||||
return executionResult;
|
||||
}
|
||||
public void setPassRate(String passRate)
|
||||
{
|
||||
this.passRate = passRate;
|
||||
}
|
||||
|
||||
public String getPassRate()
|
||||
{
|
||||
return passRate;
|
||||
}
|
||||
public void setCrontab(String crontab)
|
||||
{
|
||||
this.crontab = crontab;
|
||||
}
|
||||
|
||||
public String getCrontab()
|
||||
{
|
||||
return crontab;
|
||||
}
|
||||
public void setCrontabStatus(Integer crontabStatus)
|
||||
{
|
||||
this.crontabStatus = crontabStatus;
|
||||
}
|
||||
|
||||
public Integer getCrontabStatus()
|
||||
{
|
||||
return crontabStatus;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("groupId", getGroupId())
|
||||
.append("name", getName())
|
||||
.append("caseLevel", getCaseLevel())
|
||||
.append("status", getStatus())
|
||||
.append("label", getLabel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("dutyBy", getDutyBy())
|
||||
.append("runEnvironment", getRunEnvironment())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("stepsNumber", getStepsNumber())
|
||||
.append("executionResult", getExecutionResult())
|
||||
.append("passRate", getPassRate())
|
||||
.append("crontab", getCrontab())
|
||||
.append("crontabStatus", getCrontabStatus())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
204
test-test/src/main/java/com/test/test/domain/UiHighSetting.java
Normal file
204
test-test/src/main/java/com/test/test/domain/UiHighSetting.java
Normal file
@@ -0,0 +1,204 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui高级设置对象 ui_high_setting
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public class UiHighSetting extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 场景步骤id */
|
||||
@Excel(name = "场景步骤id")
|
||||
private Long sceneStepsId;
|
||||
|
||||
/** 设置类型 */
|
||||
@Excel(name = "设置类型")
|
||||
private String settingType;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型")
|
||||
private String operateType;
|
||||
|
||||
/** 等待时间 */
|
||||
@Excel(name = "等待时间")
|
||||
private String awateTime;
|
||||
|
||||
/** 断言json */
|
||||
@Excel(name = "断言json")
|
||||
private String assertionJson;
|
||||
|
||||
/** 数据提取json */
|
||||
@Excel(name = "数据提取json")
|
||||
private String extractionDataJson;
|
||||
|
||||
/** 错误处理 */
|
||||
@Excel(name = "错误处理")
|
||||
private String errorHandling;
|
||||
|
||||
/** 其他设置 */
|
||||
@Excel(name = "其他设置")
|
||||
private String otherSetting;
|
||||
|
||||
/** 设置顺序 */
|
||||
@Excel(name = "设置顺序")
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 是否禁用 */
|
||||
@Excel(name = "是否禁用")
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSceneStepsId(Long sceneStepsId)
|
||||
{
|
||||
this.sceneStepsId = sceneStepsId;
|
||||
}
|
||||
|
||||
public Long getSceneStepsId()
|
||||
{
|
||||
return sceneStepsId;
|
||||
}
|
||||
public void setSettingType(String settingType)
|
||||
{
|
||||
this.settingType = settingType;
|
||||
}
|
||||
|
||||
public String getSettingType()
|
||||
{
|
||||
return settingType;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setOperateType(String operateType)
|
||||
{
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getOperateType()
|
||||
{
|
||||
return operateType;
|
||||
}
|
||||
public void setAwateTime(String awateTime)
|
||||
{
|
||||
this.awateTime = awateTime;
|
||||
}
|
||||
|
||||
public String getAwateTime()
|
||||
{
|
||||
return awateTime;
|
||||
}
|
||||
public void setAssertionJson(String assertionJson)
|
||||
{
|
||||
this.assertionJson = assertionJson;
|
||||
}
|
||||
|
||||
public String getAssertionJson()
|
||||
{
|
||||
return assertionJson;
|
||||
}
|
||||
public void setExtractionDataJson(String extractionDataJson)
|
||||
{
|
||||
this.extractionDataJson = extractionDataJson;
|
||||
}
|
||||
|
||||
public String getExtractionDataJson()
|
||||
{
|
||||
return extractionDataJson;
|
||||
}
|
||||
public void setErrorHandling(String errorHandling)
|
||||
{
|
||||
this.errorHandling = errorHandling;
|
||||
}
|
||||
|
||||
public String getErrorHandling()
|
||||
{
|
||||
return errorHandling;
|
||||
}
|
||||
public void setOtherSetting(String otherSetting)
|
||||
{
|
||||
this.otherSetting = otherSetting;
|
||||
}
|
||||
|
||||
public String getOtherSetting()
|
||||
{
|
||||
return otherSetting;
|
||||
}
|
||||
public void setOrderNumber(Integer orderNumber)
|
||||
{
|
||||
this.orderNumber = orderNumber;
|
||||
}
|
||||
|
||||
public Integer getOrderNumber()
|
||||
{
|
||||
return orderNumber;
|
||||
}
|
||||
public void setIsDisabled(Integer isDisabled)
|
||||
{
|
||||
this.isDisabled = isDisabled;
|
||||
}
|
||||
|
||||
public Integer getIsDisabled()
|
||||
{
|
||||
return isDisabled;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sceneStepsId", getSceneStepsId())
|
||||
.append("settingType", getSettingType())
|
||||
.append("name", getName())
|
||||
.append("operateType", getOperateType())
|
||||
.append("awateTime", getAwateTime())
|
||||
.append("assertionJson", getAssertionJson())
|
||||
.append("extractionDataJson", getExtractionDataJson())
|
||||
.append("errorHandling", getErrorHandling())
|
||||
.append("otherSetting", getOtherSetting())
|
||||
.append("orderNumber", getOrderNumber())
|
||||
.append("isDisabled", getIsDisabled())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
376
test-test/src/main/java/com/test/test/domain/UiSceneSteps.java
Normal file
376
test-test/src/main/java/com/test/test/domain/UiSceneSteps.java
Normal file
@@ -0,0 +1,376 @@
|
||||
package com.test.test.domain;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.test.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤对象 ui_scene_steps
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public class UiSceneSteps extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
@Excel(name = "模块id")
|
||||
private Long automationId;
|
||||
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型")
|
||||
private String operateType;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 步骤类型 */
|
||||
@Excel(name = "步骤类型")
|
||||
private String stepType;
|
||||
|
||||
/** url */
|
||||
@Excel(name = "url")
|
||||
private String url;
|
||||
|
||||
/** 是否追加页面 */
|
||||
@Excel(name = "是否追加页面")
|
||||
private Integer isAppendPage;
|
||||
|
||||
/** 操作 */
|
||||
@Excel(name = "操作")
|
||||
private Integer operate;
|
||||
|
||||
/** 操作对象 */
|
||||
@Excel(name = "操作对象")
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
@Excel(name = "元素库名称")
|
||||
private Integer operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
@Excel(name = "元素id")
|
||||
private Integer operateElementId;
|
||||
|
||||
/** 元素定位类型 */
|
||||
@Excel(name = "元素定位类型")
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
@Excel(name = "元素定位值")
|
||||
private String operateLocValue;
|
||||
|
||||
/** 点击方式 */
|
||||
@Excel(name = "点击方式")
|
||||
private String clickMethod;
|
||||
|
||||
/** 输入内容 */
|
||||
@Excel(name = "输入内容")
|
||||
private String inputValue;
|
||||
|
||||
/** 窗口尺寸 */
|
||||
@Excel(name = "窗口尺寸")
|
||||
private Integer windowSize;
|
||||
|
||||
/** 子选项 */
|
||||
@Excel(name = "子选项")
|
||||
private String subOptions;
|
||||
|
||||
/** 子选项值 */
|
||||
@Excel(name = "子选项值")
|
||||
private String subOptionsValue;
|
||||
|
||||
/** 等待值 */
|
||||
@Excel(name = "等待值")
|
||||
private String awaitValue;
|
||||
|
||||
/** 是否禁用 */
|
||||
@Excel(name = "是否禁用")
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 场景步骤序号 */
|
||||
@Excel(name = "场景步骤序号")
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 句柄id */
|
||||
@Excel(name = "句柄id")
|
||||
private String handleId;
|
||||
|
||||
/** 网页索引号 */
|
||||
@Excel(name = "网页索引号")
|
||||
private Integer pageIndex;
|
||||
|
||||
/** frame索引号 */
|
||||
@Excel(name = "frame索引号")
|
||||
private Integer frameIndex;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAutomationId(Long automationId)
|
||||
{
|
||||
this.automationId = automationId;
|
||||
}
|
||||
|
||||
public Long getAutomationId()
|
||||
{
|
||||
return automationId;
|
||||
}
|
||||
public void setOperateType(String operateType)
|
||||
{
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getOperateType()
|
||||
{
|
||||
return operateType;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStepType(String stepType)
|
||||
{
|
||||
this.stepType = stepType;
|
||||
}
|
||||
|
||||
public String getStepType()
|
||||
{
|
||||
return stepType;
|
||||
}
|
||||
public void setUrl(String url)
|
||||
{
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getUrl()
|
||||
{
|
||||
return url;
|
||||
}
|
||||
public void setIsAppendPage(Integer isAppendPage)
|
||||
{
|
||||
this.isAppendPage = isAppendPage;
|
||||
}
|
||||
|
||||
public Integer getIsAppendPage()
|
||||
{
|
||||
return isAppendPage;
|
||||
}
|
||||
public void setOperate(Integer operate)
|
||||
{
|
||||
this.operate = operate;
|
||||
}
|
||||
|
||||
public Integer getOperate()
|
||||
{
|
||||
return operate;
|
||||
}
|
||||
public void setOperateObject(String operateObject)
|
||||
{
|
||||
this.operateObject = operateObject;
|
||||
}
|
||||
|
||||
public String getOperateObject()
|
||||
{
|
||||
return operateObject;
|
||||
}
|
||||
public void setOperateGroupId(Integer operateGroupId)
|
||||
{
|
||||
this.operateGroupId = operateGroupId;
|
||||
}
|
||||
|
||||
public Integer getOperateGroupId()
|
||||
{
|
||||
return operateGroupId;
|
||||
}
|
||||
public void setOperateElementId(Integer operateElementId)
|
||||
{
|
||||
this.operateElementId = operateElementId;
|
||||
}
|
||||
|
||||
public Integer getOperateElementId()
|
||||
{
|
||||
return operateElementId;
|
||||
}
|
||||
public void setOperateLocType(String operateLocType)
|
||||
{
|
||||
this.operateLocType = operateLocType;
|
||||
}
|
||||
|
||||
public String getOperateLocType()
|
||||
{
|
||||
return operateLocType;
|
||||
}
|
||||
public void setOperateLocValue(String operateLocValue)
|
||||
{
|
||||
this.operateLocValue = operateLocValue;
|
||||
}
|
||||
|
||||
public String getOperateLocValue()
|
||||
{
|
||||
return operateLocValue;
|
||||
}
|
||||
public void setClickMethod(String clickMethod)
|
||||
{
|
||||
this.clickMethod = clickMethod;
|
||||
}
|
||||
|
||||
public String getClickMethod()
|
||||
{
|
||||
return clickMethod;
|
||||
}
|
||||
public void setInputValue(String inputValue)
|
||||
{
|
||||
this.inputValue = inputValue;
|
||||
}
|
||||
|
||||
public String getInputValue()
|
||||
{
|
||||
return inputValue;
|
||||
}
|
||||
public void setWindowSize(Integer windowSize)
|
||||
{
|
||||
this.windowSize = windowSize;
|
||||
}
|
||||
|
||||
public Integer getWindowSize()
|
||||
{
|
||||
return windowSize;
|
||||
}
|
||||
public void setSubOptions(String subOptions)
|
||||
{
|
||||
this.subOptions = subOptions;
|
||||
}
|
||||
|
||||
public String getSubOptions()
|
||||
{
|
||||
return subOptions;
|
||||
}
|
||||
public void setSubOptionsValue(String subOptionsValue)
|
||||
{
|
||||
this.subOptionsValue = subOptionsValue;
|
||||
}
|
||||
|
||||
public String getSubOptionsValue()
|
||||
{
|
||||
return subOptionsValue;
|
||||
}
|
||||
public void setAwaitValue(String awaitValue)
|
||||
{
|
||||
this.awaitValue = awaitValue;
|
||||
}
|
||||
|
||||
public String getAwaitValue()
|
||||
{
|
||||
return awaitValue;
|
||||
}
|
||||
public void setIsDisabled(Integer isDisabled)
|
||||
{
|
||||
this.isDisabled = isDisabled;
|
||||
}
|
||||
|
||||
public Integer getIsDisabled()
|
||||
{
|
||||
return isDisabled;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setOrderNumber(Integer orderNumber)
|
||||
{
|
||||
this.orderNumber = orderNumber;
|
||||
}
|
||||
|
||||
public Integer getOrderNumber()
|
||||
{
|
||||
return orderNumber;
|
||||
}
|
||||
public void setHandleId(String handleId)
|
||||
{
|
||||
this.handleId = handleId;
|
||||
}
|
||||
|
||||
public String getHandleId()
|
||||
{
|
||||
return handleId;
|
||||
}
|
||||
public void setPageIndex(Integer pageIndex)
|
||||
{
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
public Integer getPageIndex()
|
||||
{
|
||||
return pageIndex;
|
||||
}
|
||||
public void setFrameIndex(Integer frameIndex)
|
||||
{
|
||||
this.frameIndex = frameIndex;
|
||||
}
|
||||
|
||||
public Integer getFrameIndex()
|
||||
{
|
||||
return frameIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("automationId", getAutomationId())
|
||||
.append("operateType", getOperateType())
|
||||
.append("name", getName())
|
||||
.append("stepType", getStepType())
|
||||
.append("url", getUrl())
|
||||
.append("isAppendPage", getIsAppendPage())
|
||||
.append("operate", getOperate())
|
||||
.append("operateObject", getOperateObject())
|
||||
.append("operateGroupId", getOperateGroupId())
|
||||
.append("operateElementId", getOperateElementId())
|
||||
.append("operateLocType", getOperateLocType())
|
||||
.append("operateLocValue", getOperateLocValue())
|
||||
.append("clickMethod", getClickMethod())
|
||||
.append("inputValue", getInputValue())
|
||||
.append("windowSize", getWindowSize())
|
||||
.append("subOptions", getSubOptions())
|
||||
.append("subOptionsValue", getSubOptionsValue())
|
||||
.append("awaitValue", getAwaitValue())
|
||||
.append("isDisabled", getIsDisabled())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("orderNumber", getOrderNumber())
|
||||
.append("handleId", getHandleId())
|
||||
.append("pageIndex", getPageIndex())
|
||||
.append("frameIndex", getFrameIndex())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 断言
|
||||
*/
|
||||
@Data
|
||||
public class AssertionQO {
|
||||
|
||||
/**断言类型 1断言值 2弹窗文本 3元素断言 4下拉框 5网页标题*/
|
||||
private String assertionType;
|
||||
|
||||
/**网页标题*/
|
||||
private String pageTitle;
|
||||
|
||||
/** 操作对象 1元素对象 2元素定位*/
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
private Integer operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
private Integer operateElementId;
|
||||
|
||||
/** 元素定位类型 id css ……*/
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
private String operateLocValue;
|
||||
|
||||
/**元素属性*/
|
||||
private String elementAttribute;
|
||||
|
||||
/**断言方式*/
|
||||
private String assertionMode;
|
||||
|
||||
/**期望值*/
|
||||
private String expectations;
|
||||
|
||||
/**变量*/
|
||||
private String variable;
|
||||
|
||||
/**条件 1等于 2不等于 3包含 ……*/
|
||||
private String condition;
|
||||
|
||||
/**是否为弹窗文本*/
|
||||
private String isPopText;
|
||||
|
||||
|
||||
/**失败是否中止 0否 1是*/
|
||||
private String isFailedAbort;
|
||||
|
||||
/**是否禁用 0否 1是*/
|
||||
private String isDisabled;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 数据提取
|
||||
*/
|
||||
@Data
|
||||
public class DataExtractionQO {
|
||||
|
||||
/** 1提取元素信息 2提取窗口信息 */
|
||||
private String informationType;
|
||||
|
||||
/** 1普通对象(store) 2元素文本(storeText) 3元素值(storeValue) 4元素属性(storeAttribute)
|
||||
* 5CSS属性(storeCssAttribute) 6匹配 xpath 的元素数量(storeXpathCount) */
|
||||
private String elementType;
|
||||
|
||||
/** 1窗口 Handle(storeWindowHandle) 2网页标题(storeTitle) */
|
||||
private String windowType;
|
||||
|
||||
/**值 */
|
||||
private String value;
|
||||
|
||||
|
||||
/** 操作对象 1元素对象 2元素定位*/
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
private Integer operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
private Integer operateElementId;
|
||||
|
||||
/** 元素定位类型 id css ……*/
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
private String operateLocValue;
|
||||
|
||||
/**元素属性*/
|
||||
private String elementAttribute;
|
||||
|
||||
/**是否禁用 0否 1是 */
|
||||
private String isDisabled;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OtherSettingsQO {
|
||||
private Integer waitElementTime;
|
||||
private Integer screenshotConfiguration;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化对象 ui_automation
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
public class UiAutomationDataQO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
private Long groupId;
|
||||
|
||||
/** 场景名称 */
|
||||
private String name;
|
||||
|
||||
/** 用例等级 */
|
||||
private String caseLevel;
|
||||
|
||||
/** 状态 0未开始 1进行中 2已完成 */
|
||||
private String status;
|
||||
|
||||
/** 标签 */
|
||||
private String label;
|
||||
|
||||
/** 责任人 */
|
||||
private String dutyBy;
|
||||
|
||||
/** 运行环境 */
|
||||
private String runEnvironment;
|
||||
|
||||
/** 步骤数 */
|
||||
private Long stepsNumber;
|
||||
|
||||
/** 执行结果 */
|
||||
private String executionResult;
|
||||
|
||||
/** 通过率 */
|
||||
private String passRate;
|
||||
|
||||
/** 定时任务表达式 */
|
||||
private String crontab;
|
||||
|
||||
/** 定时任务表达式状态 */
|
||||
private Long crontabStatus;
|
||||
|
||||
/** 是否删除 */
|
||||
private Long delFlag;
|
||||
|
||||
/**描述*/
|
||||
private String description;
|
||||
|
||||
|
||||
/** 场景步骤 */
|
||||
private List<UiSceneStepsQO> uiSceneStepsQOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化对象 ui_automation
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
public class UiAutomationQO extends BaseEntity
|
||||
{
|
||||
/** 名称 */
|
||||
private String name;
|
||||
/** 状态 0正常 1删除 */
|
||||
private String delFlag;
|
||||
@NotNull(message = "节点id不能为空")
|
||||
private Long groupId;
|
||||
|
||||
private List<Long> groupIds;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
|
||||
private String createBy;
|
||||
|
||||
/** 状态 0未开始 1进行中 2已完成 */
|
||||
private String status;
|
||||
|
||||
private String keyword;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class UiElementQO
|
||||
private String name;
|
||||
/** 状态 0正常 1删除 */
|
||||
private String delFlag;
|
||||
@NotNull(message = "节点id不能为空")
|
||||
|
||||
private Long groupId;
|
||||
|
||||
private List<Long> groupIds;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui高级设置对象 ui_high_setting
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Data
|
||||
public class UiHighSettingQO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 场景步骤id */
|
||||
private Long sceneStepsId;
|
||||
|
||||
/** 设置类型 */
|
||||
private String settingType;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 操作类型 */
|
||||
private String operateType;
|
||||
|
||||
/** 等待时间 */
|
||||
private String awateTime;
|
||||
|
||||
/** 断言json */
|
||||
private String assertionJson;
|
||||
|
||||
/** 数据提取json */
|
||||
private String extractionDataJson;
|
||||
|
||||
/** 错误处理 */
|
||||
private String errorHandling;
|
||||
|
||||
/** 其他设置 */
|
||||
private String otherSetting;
|
||||
|
||||
/** 设置顺序 */
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 是否禁用 */
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 等待元素超时时间 */
|
||||
private Integer waitElementTime;
|
||||
|
||||
/** 截图配置 */
|
||||
private Integer screenshotConfiguration;
|
||||
|
||||
/**数据提取*/
|
||||
private List<DataExtractionQO> dataExtractionQOList = new ArrayList<>();
|
||||
|
||||
/**断言*/
|
||||
private List<AssertionQO> assertionQOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.test.test.domain.qo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import com.test.test.domain.UiHighSetting;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤对象 ui_scene_steps
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Data
|
||||
public class UiSceneStepsQO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
|
||||
private Long automationId;
|
||||
|
||||
/** 操作类型 */
|
||||
private String operateType;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 步骤类型 */
|
||||
private String stepType;
|
||||
|
||||
/** url */
|
||||
private String url;
|
||||
|
||||
/** 是否追加页面 */
|
||||
private Integer isAppendPage;
|
||||
|
||||
/** 操作 */
|
||||
private Integer operate;
|
||||
|
||||
/** 操作对象 */
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
private Integer operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
private Integer operateElementId;
|
||||
|
||||
/** 元素定位类型 */
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
private String operateLocValue;
|
||||
|
||||
/** 点击方式 */
|
||||
private String clickMethod;
|
||||
|
||||
/** 输入内容 */
|
||||
private String inputValue;
|
||||
|
||||
/** 窗口尺寸 */
|
||||
private Integer windowSize;
|
||||
|
||||
/** 子选项 */
|
||||
private String subOptions;
|
||||
|
||||
/** 子选项值 */
|
||||
private String subOptionsValue;
|
||||
|
||||
/** 等待值 */
|
||||
private String awaitValue;
|
||||
|
||||
/** 是否禁用 */
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 场景步骤序号 */
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 句柄id */
|
||||
private String handleId;
|
||||
|
||||
/** 网页索引号 */
|
||||
private Integer pageIndex;
|
||||
|
||||
/** frame索引号 */
|
||||
private Integer frameIndex;
|
||||
|
||||
/**高级设置*/
|
||||
private List<UiHighSettingQO> uiHighSettingList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化对象 ui_automation
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
public class UiAutomationVO
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 模块id */
|
||||
private Long groupId;
|
||||
|
||||
/** 场景名称 */
|
||||
private String name;
|
||||
|
||||
/** 用例等级 */
|
||||
private String caseLevel;
|
||||
|
||||
/** 状态 未开始 进行中 已完成 */
|
||||
private String status;
|
||||
|
||||
/** 标签 */
|
||||
private String label;
|
||||
|
||||
/** 责任人 */
|
||||
private String dutyBy;
|
||||
|
||||
/**描述*/
|
||||
private String description;
|
||||
|
||||
/**场景步骤*/
|
||||
private List<UiSceneStepsVO> uiSceneStepsVOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import com.test.test.domain.qo.AssertionQO;
|
||||
import com.test.test.domain.qo.DataExtractionQO;
|
||||
import com.test.test.domain.qo.OtherSettingsQO;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui高级设置对象 ui_high_setting
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Data
|
||||
public class UiHighSettingVO
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 场景步骤id */
|
||||
private Long sceneStepsId;
|
||||
|
||||
/** 设置类型 */
|
||||
private String settingType;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 操作类型 */
|
||||
private String operateType;
|
||||
|
||||
/** 等待时间 */
|
||||
private String awateTime;
|
||||
|
||||
/** 错误处理 */
|
||||
private String errorHandling;
|
||||
|
||||
/** 设置顺序 */
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 是否禁用 */
|
||||
private Integer isDisabled;
|
||||
|
||||
/**断言*/
|
||||
private List<AssertionQO> assertionQOList = new ArrayList<>();
|
||||
|
||||
/**数据提取*/
|
||||
private List<DataExtractionQO> dataExtractionQOList = new ArrayList<>();
|
||||
|
||||
/**其他设置*/
|
||||
private OtherSettingsQO otherSettingsQO;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.test.test.domain.vo;
|
||||
|
||||
import com.test.common.annotation.Excel;
|
||||
import com.test.common.core.domain.BaseEntity;
|
||||
import jdk.jfr.DataAmount;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤对象 ui_scene_steps
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Data
|
||||
public class UiSceneStepsVO
|
||||
{
|
||||
|
||||
private Long automationId;
|
||||
|
||||
/** 操作类型 */
|
||||
private String operateType;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 步骤类型 */
|
||||
private String stepType;
|
||||
|
||||
/** url */
|
||||
private String url;
|
||||
|
||||
/** 是否追加页面 */
|
||||
private Integer isAppendPage;
|
||||
|
||||
/** 操作 */
|
||||
private Integer operate;
|
||||
|
||||
/** 操作对象 */
|
||||
private String operateObject;
|
||||
|
||||
/** 元素库名称 */
|
||||
private Integer operateGroupId;
|
||||
|
||||
/** 元素id */
|
||||
private Integer operateElementId;
|
||||
|
||||
/** 元素定位类型 */
|
||||
private String operateLocType;
|
||||
|
||||
/** 元素定位值 */
|
||||
private String operateLocValue;
|
||||
|
||||
/** 点击方式 */
|
||||
private String clickMethod;
|
||||
|
||||
/** 输入内容 */
|
||||
private String inputValue;
|
||||
|
||||
/** 窗口尺寸 */
|
||||
private Integer windowSize;
|
||||
|
||||
/** 子选项 */
|
||||
private String subOptions;
|
||||
|
||||
/** 子选项值 */
|
||||
private String subOptionsValue;
|
||||
|
||||
/** 等待值 */
|
||||
private String awaitValue;
|
||||
|
||||
/** 是否禁用 */
|
||||
private Integer isDisabled;
|
||||
|
||||
/** 是否删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 场景步骤序号 */
|
||||
private Integer orderNumber;
|
||||
|
||||
/** 句柄id */
|
||||
private String handleId;
|
||||
|
||||
/** 网页索引号 */
|
||||
private Integer pageIndex;
|
||||
|
||||
/** frame索引号 */
|
||||
private Integer frameIndex;
|
||||
|
||||
/**高级设置*/
|
||||
private List<UiHighSettingVO> uiHighSettingVOList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiAutomation;
|
||||
import com.test.test.domain.qo.UiAutomationQO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface UiAutomationMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui自动化
|
||||
*
|
||||
* @param id ui自动化主键
|
||||
* @return ui自动化
|
||||
*/
|
||||
public UiAutomation selectUiAutomationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui自动化列表
|
||||
*
|
||||
* @param uiAutomation ui自动化
|
||||
* @return ui自动化集合
|
||||
*/
|
||||
public List<UiAutomation> selectUiAutomationList(UiAutomation uiAutomation);
|
||||
|
||||
/**
|
||||
* 查询ui自动化列表
|
||||
* @param uiAutomation
|
||||
* @return
|
||||
*/
|
||||
public List<UiAutomation> selectUiAutomationListNew(UiAutomationQO uiAutomation);
|
||||
|
||||
/**
|
||||
* 新增ui自动化
|
||||
*
|
||||
* @param uiAutomation ui自动化
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiAutomation(UiAutomation uiAutomation);
|
||||
|
||||
/**
|
||||
* 修改ui自动化
|
||||
*
|
||||
* @param uiAutomation ui自动化
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiAutomation(UiAutomation uiAutomation);
|
||||
|
||||
/**
|
||||
* 删除ui自动化
|
||||
*
|
||||
* @param id ui自动化主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiAutomationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiAutomationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteUiAutomationByGroupIds(List<Long> ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiHighSetting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui高级设置Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public interface UiHighSettingMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui高级设置
|
||||
*
|
||||
* @param id ui高级设置主键
|
||||
* @return ui高级设置
|
||||
*/
|
||||
public List<UiHighSetting> selectUiHighSettingById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui高级设置列表
|
||||
*
|
||||
* @param uiHighSetting ui高级设置
|
||||
* @return ui高级设置集合
|
||||
*/
|
||||
public List<UiHighSetting> selectUiHighSettingList(UiHighSetting uiHighSetting);
|
||||
|
||||
/**
|
||||
* 新增ui高级设置
|
||||
*
|
||||
* @param uiHighSetting ui高级设置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiHighSetting(UiHighSetting uiHighSetting);
|
||||
|
||||
/**
|
||||
* 修改ui高级设置
|
||||
*
|
||||
* @param uiHighSetting ui高级设置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiHighSetting(UiHighSetting uiHighSetting);
|
||||
|
||||
/**
|
||||
* 删除ui高级设置
|
||||
*
|
||||
* @param sceneStepsId ui高级设置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiHighSettingById(Long sceneStepsId);
|
||||
|
||||
/**
|
||||
* 批量删除ui高级设置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiHighSettingByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.UiSceneSteps;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤Mapper接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public interface UiSceneStepsMapper
|
||||
{
|
||||
/**
|
||||
* 查询ui自动化场景步骤
|
||||
*
|
||||
* @param automationId ui自动化场景步骤主键
|
||||
* @return ui自动化场景步骤
|
||||
*/
|
||||
public List<UiSceneSteps> selectUiSceneStepsById(Long automationId);
|
||||
|
||||
/**
|
||||
* 查询ui自动化场景步骤列表
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return ui自动化场景步骤集合
|
||||
*/
|
||||
public List<UiSceneSteps> selectUiSceneStepsList(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 新增ui自动化场景步骤
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiSceneSteps(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 修改ui自动化场景步骤
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiSceneSteps(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 删除ui自动化场景步骤
|
||||
*
|
||||
* @param automationId ui自动化场景步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiSceneStepsById(Long automationId);
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化场景步骤
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiSceneStepsByIds(Long[] ids);
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public interface ITestGroupService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<Long> getAllChildIds(Long id);
|
||||
List<Long> getAllChildIds(Long id,String type);
|
||||
|
||||
/**
|
||||
* 获取模块名
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.UiAutomation;
|
||||
import com.test.test.domain.qo.UiAutomationDataQO;
|
||||
import com.test.test.domain.qo.UiAutomationQO;
|
||||
import com.test.test.domain.vo.UiAutomationVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化Service接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface IUiAutomationService
|
||||
{
|
||||
/**
|
||||
* 查询ui自动化
|
||||
*
|
||||
* @param id ui自动化主键
|
||||
* @return ui自动化
|
||||
*/
|
||||
public UiAutomationVO selectUiAutomationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui自动化列表
|
||||
*
|
||||
* @param uiAutomation ui自动化
|
||||
* @return ui自动化集合
|
||||
*/
|
||||
public List<UiAutomation> selectUiAutomationList(UiAutomationQO uiAutomation);
|
||||
|
||||
/**
|
||||
* 新增ui自动化
|
||||
*
|
||||
* @param uiAutomationDataQO ui自动化
|
||||
* @return 结果
|
||||
*/
|
||||
public Long insertUiAutomation(UiAutomationDataQO uiAutomationDataQO);
|
||||
|
||||
/**
|
||||
* 修改ui自动化
|
||||
*
|
||||
* @param uiAutomationDataQO ui自动化
|
||||
* @return 结果
|
||||
*/
|
||||
public Long updateUiAutomation(UiAutomationDataQO uiAutomationDataQO);
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化
|
||||
*
|
||||
* @param ids 需要删除的ui自动化主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiAutomationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除ui自动化信息
|
||||
*
|
||||
* @param id ui自动化主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiAutomationById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.UiSceneSteps;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤Service接口
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public interface IUiSceneStepsService
|
||||
{
|
||||
/**
|
||||
* 查询ui自动化场景步骤
|
||||
*
|
||||
* @param id ui自动化场景步骤主键
|
||||
* @return ui自动化场景步骤
|
||||
*/
|
||||
public List<UiSceneSteps> selectUiSceneStepsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询ui自动化场景步骤列表
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return ui自动化场景步骤集合
|
||||
*/
|
||||
public List<UiSceneSteps> selectUiSceneStepsList(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 新增ui自动化场景步骤
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUiSceneSteps(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 修改ui自动化场景步骤
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUiSceneSteps(UiSceneSteps uiSceneSteps);
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化场景步骤
|
||||
*
|
||||
* @param ids 需要删除的ui自动化场景步骤主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiSceneStepsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除ui自动化场景步骤信息
|
||||
*
|
||||
* @param id ui自动化场景步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUiSceneStepsById(Long id);
|
||||
}
|
||||
@@ -7,13 +7,13 @@ import java.util.stream.Collectors;
|
||||
|
||||
import com.test.common.utils.DateUtils;
|
||||
import com.test.common.utils.StringUtils;
|
||||
import com.test.test.domain.UiSceneSteps;
|
||||
import com.test.test.domain.qo.GroupDelectQO;
|
||||
import com.test.test.mapper.UiElementMapper;
|
||||
import com.test.test.mapper.*;
|
||||
import com.test.test.service.IUiElementService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.test.test.mapper.TestGroupMapper;
|
||||
import com.test.test.domain.TestGroup;
|
||||
import com.test.test.service.ITestGroupService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -36,6 +36,15 @@ public class TestGroupServiceImpl implements ITestGroupService {
|
||||
@Resource
|
||||
private UiElementMapper uiElementMapper;
|
||||
|
||||
@Resource
|
||||
private UiAutomationMapper uiAutomationMapper;
|
||||
|
||||
@Resource
|
||||
private UiSceneStepsMapper uiSceneStepsMapper;
|
||||
|
||||
@Resource
|
||||
private UiHighSettingMapper uiHighSettingMapper;
|
||||
|
||||
/**
|
||||
* 查询节点(文件夹)列表
|
||||
*/
|
||||
@@ -88,9 +97,22 @@ public class TestGroupServiceImpl implements ITestGroupService {
|
||||
case "task":
|
||||
System.out.println("task");
|
||||
break;
|
||||
case "ui":
|
||||
case "element":
|
||||
uiElementMapper.deleteUiElementByGroupIds(idList);
|
||||
break;
|
||||
case "automation":
|
||||
for (Long id : idList) {
|
||||
UiSceneSteps uiSceneSteps = new UiSceneSteps();
|
||||
uiSceneSteps.setAutomationId(id);
|
||||
uiSceneSteps.setDelFlag(0);
|
||||
List<UiSceneSteps> uiSceneStepsList = uiSceneStepsMapper.selectUiSceneStepsList(uiSceneSteps);
|
||||
for (UiSceneSteps sceneSteps : uiSceneStepsList) {
|
||||
uiHighSettingMapper.deleteUiHighSettingById(sceneSteps.getId());
|
||||
}
|
||||
uiSceneStepsMapper.deleteUiSceneStepsById(id);
|
||||
}
|
||||
uiAutomationMapper.deleteUiAutomationByGroupIds(idList);
|
||||
break;
|
||||
default:
|
||||
throw new Exception(StringUtils.format("文件夹类型({})非法。 ", qo.getType()));
|
||||
}
|
||||
@@ -113,8 +135,8 @@ public class TestGroupServiceImpl implements ITestGroupService {
|
||||
* @param id 要查询的ID
|
||||
* @return 所有子元素ID集合(包含自身ID)
|
||||
*/
|
||||
public List<Long> getAllChildIds(Long id) {
|
||||
List<TestGroup> allGroups = selectTestGroupList("ui");
|
||||
public List<Long> getAllChildIds(Long id,String type) {
|
||||
List<TestGroup> allGroups = selectTestGroupList(type);
|
||||
List<Long> result = new ArrayList<>();
|
||||
|
||||
// 如果传入的是根节点(parentId=0),则查询所有数据
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
package com.test.test.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.test.common.utils.DateUtils;
|
||||
import com.test.common.utils.SecurityUtils;
|
||||
import com.test.common.utils.StringUtils;
|
||||
import com.test.test.domain.UiAutomation;
|
||||
import com.test.test.domain.UiHighSetting;
|
||||
import com.test.test.domain.UiSceneSteps;
|
||||
import com.test.test.domain.qo.*;
|
||||
import com.test.test.domain.vo.UiAutomationVO;
|
||||
import com.test.test.domain.vo.UiHighSettingVO;
|
||||
import com.test.test.domain.vo.UiSceneStepsVO;
|
||||
import com.test.test.mapper.UiAutomationMapper;
|
||||
import com.test.test.mapper.UiHighSettingMapper;
|
||||
import com.test.test.mapper.UiSceneStepsMapper;
|
||||
import com.test.test.service.ITestGroupService;
|
||||
import com.test.test.service.IUiAutomationService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* ui自动化Service业务层处理
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Service
|
||||
public class UiAutomationServiceImpl implements IUiAutomationService {
|
||||
@Resource
|
||||
private UiAutomationMapper uiAutomationMapper;
|
||||
@Resource
|
||||
private ITestGroupService testGroupService;
|
||||
@Resource
|
||||
private UiHighSettingMapper uiHighSettingMapper;
|
||||
@Resource
|
||||
private UiSceneStepsMapper uiSceneStepsMapper;
|
||||
|
||||
private final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
/**
|
||||
* 查询ui自动化
|
||||
*
|
||||
* @param id ui自动化主键
|
||||
* @return ui自动化
|
||||
*/
|
||||
@Override
|
||||
public UiAutomationVO selectUiAutomationById(Long id) {
|
||||
UiAutomationVO uiAutomationVO = new UiAutomationVO();
|
||||
UiAutomation automation = uiAutomationMapper.selectUiAutomationById(id);
|
||||
BeanUtils.copyProperties(automation, uiAutomationVO);
|
||||
|
||||
List<UiSceneSteps> uiSceneStepsList = uiSceneStepsMapper.selectUiSceneStepsById(id);
|
||||
for (UiSceneSteps uiSceneSteps : uiSceneStepsList) {
|
||||
UiSceneStepsVO uiSceneStepsVO = new UiSceneStepsVO();
|
||||
BeanUtils.copyProperties(uiSceneSteps, uiSceneStepsVO);
|
||||
uiAutomationVO.getUiSceneStepsVOList().add(uiSceneStepsVO);
|
||||
List<UiHighSetting> uiHighSettings = uiHighSettingMapper.selectUiHighSettingById(uiSceneSteps.getId());
|
||||
for (UiHighSetting uiHighSetting : uiHighSettings) {
|
||||
UiHighSettingVO uiHighSettingVO = new UiHighSettingVO();
|
||||
BeanUtils.copyProperties(uiHighSetting, uiHighSettingVO);
|
||||
// 转换assertionJson 断言
|
||||
if (StringUtils.isNotBlank(uiHighSetting.getAssertionJson())) {
|
||||
List<AssertionQO> assertionList = null;
|
||||
try {
|
||||
assertionList = objectMapper.readValue(
|
||||
uiHighSetting.getAssertionJson(),
|
||||
new TypeReference<List<AssertionQO>>() {
|
||||
}
|
||||
);
|
||||
uiHighSettingVO.setAssertionQOList(assertionList);
|
||||
// 转换extractionDataJson 数据提取
|
||||
if (StringUtils.isNotBlank(uiHighSetting.getExtractionDataJson())) {
|
||||
List<DataExtractionQO> extractionData = null;
|
||||
extractionData = objectMapper.readValue(
|
||||
uiHighSetting.getExtractionDataJson(),
|
||||
new TypeReference<List<DataExtractionQO>>(){
|
||||
} // 根据实际结构可以定义具体类
|
||||
);
|
||||
uiHighSettingVO.setDataExtractionQOList(extractionData);
|
||||
}
|
||||
// 转换otherSetting 其他设置
|
||||
if (StringUtils.isNotBlank(uiHighSetting.getOtherSetting())) {
|
||||
OtherSettingsQO otherSettings = objectMapper.readValue(
|
||||
uiHighSetting.getOtherSetting(),
|
||||
OtherSettingsQO.class
|
||||
);
|
||||
uiHighSettingVO.setOtherSettingsQO(otherSettings);
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
uiSceneStepsVO.getUiHighSettingVOList().add(uiHighSettingVO);
|
||||
}
|
||||
}
|
||||
return uiAutomationVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询ui自动化列表
|
||||
*
|
||||
* @param uiAutomation ui自动化
|
||||
* @return ui自动化
|
||||
*/
|
||||
@Override
|
||||
public List<UiAutomation> selectUiAutomationList(UiAutomationQO uiAutomation) {
|
||||
uiAutomation.setDelFlag("0");
|
||||
//这里要递归查询子元素
|
||||
Long groupId = uiAutomation.getGroupId();
|
||||
if (groupId != null) {
|
||||
List<Long> allChildIds = testGroupService.getAllChildIds(groupId, "automation");
|
||||
uiAutomation.setGroupIds(allChildIds);
|
||||
}
|
||||
// 查询元素列表
|
||||
List<UiAutomation> uiAutomations = uiAutomationMapper.selectUiAutomationListNew(uiAutomation);
|
||||
|
||||
return uiAutomations;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增ui自动化
|
||||
*
|
||||
* @param uiAutomationDataQO ui自动化
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Long insertUiAutomation(UiAutomationDataQO uiAutomationDataQO) {
|
||||
UiAutomation uiAutomation = new UiAutomation();
|
||||
BeanUtils.copyProperties(uiAutomationDataQO, uiAutomation);
|
||||
//新增ui自动化表
|
||||
uiAutomation.setCreateTime(DateUtils.getNowDate());
|
||||
uiAutomation.setUpdateTime(DateUtils.getNowDate());
|
||||
uiAutomation.setCreateBy(SecurityUtils.getUsername());
|
||||
uiAutomation.setUpdateBy(SecurityUtils.getUsername());
|
||||
uiAutomation.setStatus("1"); //未开始
|
||||
uiAutomation.setDutyBy(SecurityUtils.getUsername());
|
||||
uiAutomation.setDelFlag(0);
|
||||
uiAutomationMapper.insertUiAutomation(uiAutomation);
|
||||
Long automationId = uiAutomation.getId();
|
||||
//新增场景步骤
|
||||
List<UiSceneStepsQO> uiSceneStepsQOList = uiAutomationDataQO.getUiSceneStepsQOList();
|
||||
for (UiSceneStepsQO uiSceneStepsQO : uiSceneStepsQOList) {
|
||||
UiSceneSteps uiSceneSteps = new UiSceneSteps();
|
||||
BeanUtils.copyProperties(uiSceneStepsQO, uiSceneSteps);
|
||||
uiSceneSteps.setAutomationId(automationId);
|
||||
uiSceneSteps.setUpdateBy(SecurityUtils.getUsername());
|
||||
uiSceneSteps.setUpdateTime(DateUtils.getNowDate());
|
||||
uiSceneSteps.setCreateTime(DateUtils.getNowDate());
|
||||
uiSceneSteps.setCreateBy(SecurityUtils.getUsername());
|
||||
uiSceneSteps.setDelFlag(0);
|
||||
uiSceneStepsMapper.insertUiSceneSteps(uiSceneSteps);
|
||||
Long stepsId = uiSceneSteps.getId();
|
||||
//高级设置
|
||||
List<UiHighSettingQO> uiHighSettingQOList = uiSceneStepsQO.getUiHighSettingList();
|
||||
for (UiHighSettingQO uiHighSettingQO : uiHighSettingQOList) {
|
||||
UiHighSetting uiHighSetting = new UiHighSetting();
|
||||
BeanUtils.copyProperties(uiHighSettingQO, uiHighSetting);
|
||||
uiHighSetting.setSceneStepsId(stepsId);
|
||||
uiHighSetting.setDelFlag(0);
|
||||
uiHighSetting.setUpdateBy(SecurityUtils.getUsername());
|
||||
uiHighSetting.setUpdateTime(DateUtils.getNowDate());
|
||||
uiHighSetting.setCreateBy(SecurityUtils.getUsername());
|
||||
uiHighSetting.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
//数据提取
|
||||
String jsonStr = objectMapper.writeValueAsString(uiHighSettingQO.getDataExtractionQOList());
|
||||
if (jsonStr != null) {
|
||||
uiHighSetting.setExtractionDataJson(jsonStr);
|
||||
}
|
||||
//断言
|
||||
jsonStr = objectMapper.writeValueAsString(uiHighSettingQO.getAssertionQOList());
|
||||
if (jsonStr != null) {
|
||||
uiHighSetting.setAssertionJson(jsonStr);
|
||||
}
|
||||
//其他设置
|
||||
if (uiHighSettingQO.getWaitElementTime() != null || uiHighSettingQO.getScreenshotConfiguration() != null) {
|
||||
OtherSettingsQO settings = new OtherSettingsQO();
|
||||
settings.setWaitElementTime(uiHighSettingQO.getWaitElementTime());
|
||||
settings.setScreenshotConfiguration(uiHighSettingQO.getScreenshotConfiguration());
|
||||
jsonStr = objectMapper.writeValueAsString(settings);
|
||||
uiHighSetting.setOtherSetting(jsonStr);
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
uiHighSettingMapper.insertUiHighSetting(uiHighSetting);
|
||||
}
|
||||
}
|
||||
//修改步骤数
|
||||
UiAutomation automationUpdate = new UiAutomation();
|
||||
automationUpdate.setId(automationId);
|
||||
automationUpdate.setStepsNumber(uiSceneStepsQOList.size());
|
||||
uiAutomationMapper.updateUiAutomation(automationUpdate);
|
||||
return automationId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改ui自动化
|
||||
*
|
||||
* @param uiAutomationDataQO ui自动化
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Long updateUiAutomation(UiAutomationDataQO uiAutomationDataQO) {
|
||||
UiAutomation automationUpdate = new UiAutomation();
|
||||
automationUpdate.setUpdateBy(SecurityUtils.getUsername());
|
||||
automationUpdate.setUpdateTime(DateUtils.getNowDate());
|
||||
BeanUtils.copyProperties(uiAutomationDataQO, automationUpdate);
|
||||
//修改场景
|
||||
uiAutomationMapper.updateUiAutomation(automationUpdate);
|
||||
//修改场景步骤 先删除 再新增
|
||||
uiSceneStepsMapper.deleteUiSceneStepsById(uiAutomationDataQO.getId());
|
||||
//修改高级设置 先删除 再新增
|
||||
UiSceneSteps uiSceneStepsDelete = new UiSceneSteps();
|
||||
uiSceneStepsDelete.setAutomationId(uiAutomationDataQO.getId());
|
||||
uiSceneStepsDelete.setDelFlag(0);
|
||||
List<UiSceneSteps> uiSceneStepsList = uiSceneStepsMapper.selectUiSceneStepsList(uiSceneStepsDelete);
|
||||
for (UiSceneSteps sceneSteps : uiSceneStepsList) {
|
||||
uiHighSettingMapper.deleteUiHighSettingById(sceneSteps.getId());
|
||||
}
|
||||
for (UiSceneStepsQO uiSceneStepsQO : uiAutomationDataQO.getUiSceneStepsQOList()) {
|
||||
UiSceneSteps uiSceneSteps = new UiSceneSteps();
|
||||
BeanUtils.copyProperties(uiSceneStepsQO, uiSceneSteps);
|
||||
uiSceneSteps.setAutomationId(uiAutomationDataQO.getId());
|
||||
uiSceneSteps.setUpdateBy(SecurityUtils.getUsername());
|
||||
uiSceneSteps.setUpdateTime(DateUtils.getNowDate());
|
||||
uiSceneSteps.setCreateTime(DateUtils.getNowDate());
|
||||
uiSceneSteps.setCreateBy(SecurityUtils.getUsername());
|
||||
uiSceneSteps.setDelFlag(0);
|
||||
uiSceneStepsMapper.insertUiSceneSteps(uiSceneSteps);
|
||||
Long stepsId = uiSceneSteps.getId();
|
||||
for (UiHighSettingQO uiHighSettingQO : uiSceneStepsQO.getUiHighSettingList()) {
|
||||
UiHighSetting uiHighSetting = new UiHighSetting();
|
||||
BeanUtils.copyProperties(uiHighSettingQO, uiHighSetting);
|
||||
uiHighSetting.setDelFlag(0);
|
||||
uiHighSetting.setSceneStepsId(stepsId);
|
||||
uiHighSetting.setUpdateBy(SecurityUtils.getUsername());
|
||||
uiHighSetting.setUpdateTime(DateUtils.getNowDate());
|
||||
uiHighSetting.setCreateBy(SecurityUtils.getUsername());
|
||||
uiHighSetting.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
//数据提取
|
||||
String jsonStr = objectMapper.writeValueAsString(uiHighSettingQO.getDataExtractionQOList());
|
||||
if (jsonStr != null) {
|
||||
uiHighSetting.setExtractionDataJson(jsonStr);
|
||||
}
|
||||
//断言
|
||||
jsonStr = objectMapper.writeValueAsString(uiHighSettingQO.getAssertionQOList());
|
||||
if (jsonStr != null) {
|
||||
uiHighSetting.setAssertionJson(jsonStr);
|
||||
}
|
||||
//其他设置
|
||||
if (uiHighSettingQO.getWaitElementTime() != null || uiHighSettingQO.getScreenshotConfiguration() != null) {
|
||||
OtherSettingsQO settings = new OtherSettingsQO();
|
||||
settings.setWaitElementTime(uiHighSettingQO.getWaitElementTime());
|
||||
settings.setScreenshotConfiguration(uiHighSettingQO.getScreenshotConfiguration());
|
||||
jsonStr = objectMapper.writeValueAsString(settings);
|
||||
uiHighSetting.setOtherSetting(jsonStr);
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
uiHighSettingMapper.insertUiHighSetting(uiHighSetting);
|
||||
}
|
||||
|
||||
}
|
||||
//修改步骤数
|
||||
automationUpdate = new UiAutomation();
|
||||
automationUpdate.setId(uiAutomationDataQO.getId());
|
||||
automationUpdate.setStepsNumber(uiAutomationDataQO.getUiSceneStepsQOList().size());
|
||||
uiAutomationMapper.updateUiAutomation(automationUpdate);
|
||||
return uiAutomationDataQO.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化
|
||||
*
|
||||
* @param ids 需要删除的ui自动化主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteUiAutomationByIds(Long[] ids) {
|
||||
//删除场景步骤和高级设置
|
||||
for (Long id : ids) {
|
||||
UiSceneSteps uiSceneSteps = new UiSceneSteps();
|
||||
uiSceneSteps.setAutomationId(id);
|
||||
uiSceneSteps.setDelFlag(0);
|
||||
List<UiSceneSteps> uiSceneStepsList = uiSceneStepsMapper.selectUiSceneStepsList(uiSceneSteps);
|
||||
for (UiSceneSteps sceneSteps : uiSceneStepsList) {
|
||||
uiHighSettingMapper.deleteUiHighSettingById(sceneSteps.getId());
|
||||
}
|
||||
uiSceneStepsMapper.deleteUiSceneStepsById(id);
|
||||
}
|
||||
return uiAutomationMapper.deleteUiAutomationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ui自动化信息
|
||||
*
|
||||
* @param id ui自动化主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUiAutomationById(Long id) {
|
||||
return uiAutomationMapper.deleteUiAutomationById(id);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.test.test.service.impl;
|
||||
import java.util.List;
|
||||
import com.test.common.utils.DateUtils;
|
||||
import com.test.common.utils.SecurityUtils;
|
||||
import com.test.test.domain.TestGroup;
|
||||
import com.test.test.domain.UiElement;
|
||||
import com.test.test.domain.qo.UiElementQO;
|
||||
import com.test.test.mapper.TestGroupMapper;
|
||||
@@ -59,8 +60,10 @@ public class UiElementServiceImpl implements IUiElementService
|
||||
uiElement.setDelFlag("0");
|
||||
//这里要递归查询子元素
|
||||
Long groupId = uiElement.getGroupId();
|
||||
List<Long> allChildIds = testGroupService.getAllChildIds(groupId);
|
||||
uiElement.setGroupIds(allChildIds);
|
||||
if (groupId != null){
|
||||
List<Long> allChildIds = testGroupService.getAllChildIds(groupId,"element");
|
||||
uiElement.setGroupIds(allChildIds);
|
||||
}
|
||||
// 查询元素列表
|
||||
List<UiElement> elements = uiElementMapper.selectUiElementListNew(uiElement);
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.test.test.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.test.common.utils.DateUtils;
|
||||
import com.test.test.domain.UiSceneSteps;
|
||||
import com.test.test.mapper.UiSceneStepsMapper;
|
||||
import com.test.test.service.IUiSceneStepsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
* ui自动化场景步骤Service业务层处理
|
||||
*
|
||||
* @author test
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Service
|
||||
public class UiSceneStepsServiceImpl implements IUiSceneStepsService
|
||||
{
|
||||
@Autowired
|
||||
private UiSceneStepsMapper uiSceneStepsMapper;
|
||||
|
||||
/**
|
||||
* 查询ui自动化场景步骤
|
||||
*
|
||||
* @param id ui自动化场景步骤主键
|
||||
* @return ui自动化场景步骤
|
||||
*/
|
||||
@Override
|
||||
public List<UiSceneSteps> selectUiSceneStepsById(Long id)
|
||||
{
|
||||
return uiSceneStepsMapper.selectUiSceneStepsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询ui自动化场景步骤列表
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return ui自动化场景步骤
|
||||
*/
|
||||
@Override
|
||||
public List<UiSceneSteps> selectUiSceneStepsList(UiSceneSteps uiSceneSteps)
|
||||
{
|
||||
return uiSceneStepsMapper.selectUiSceneStepsList(uiSceneSteps);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增ui自动化场景步骤
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUiSceneSteps(UiSceneSteps uiSceneSteps)
|
||||
{
|
||||
uiSceneSteps.setCreateTime(DateUtils.getNowDate());
|
||||
return uiSceneStepsMapper.insertUiSceneSteps(uiSceneSteps);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改ui自动化场景步骤
|
||||
*
|
||||
* @param uiSceneSteps ui自动化场景步骤
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUiSceneSteps(UiSceneSteps uiSceneSteps)
|
||||
{
|
||||
uiSceneSteps.setUpdateTime(DateUtils.getNowDate());
|
||||
return uiSceneStepsMapper.updateUiSceneSteps(uiSceneSteps);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除ui自动化场景步骤
|
||||
*
|
||||
* @param ids 需要删除的ui自动化场景步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUiSceneStepsByIds(Long[] ids)
|
||||
{
|
||||
return uiSceneStepsMapper.deleteUiSceneStepsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除ui自动化场景步骤信息
|
||||
*
|
||||
* @param id ui自动化场景步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUiSceneStepsById(Long id)
|
||||
{
|
||||
return uiSceneStepsMapper.deleteUiSceneStepsById(id);
|
||||
}
|
||||
}
|
||||
193
test-test/src/main/resources/mapper/test/UiAutomationMapper.xml
Normal file
193
test-test/src/main/resources/mapper/test/UiAutomationMapper.xml
Normal file
@@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.test.test.mapper.UiAutomationMapper">
|
||||
|
||||
<resultMap type="UiAutomation" id="UiAutomationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="caseLevel" column="case_level" />
|
||||
<result property="status" column="status" />
|
||||
<result property="label" column="label" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="dutyBy" column="duty_by" />
|
||||
<result property="runEnvironment" column="run_environment" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="stepsNumber" column="steps_number" />
|
||||
<result property="executionResult" column="execution_result" />
|
||||
<result property="passRate" column="pass_rate" />
|
||||
<result property="crontab" column="crontab" />
|
||||
<result property="crontabStatus" column="crontab_status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="description" column="description" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUiAutomationVo">
|
||||
select id, group_id, name, case_level, status, label, create_by, duty_by, run_environment, update_time, steps_number, execution_result, pass_rate, crontab, crontab_status, del_flag,description from ui_automation
|
||||
</sql>
|
||||
|
||||
<select id="selectUiAutomationList" parameterType="UiAutomation" resultMap="UiAutomationResult">
|
||||
<include refid="selectUiAutomationVo"/>
|
||||
<where>
|
||||
<if test="groupId != null "> and group_id = #{groupId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="caseLevel != null and caseLevel != ''"> and case_level = #{caseLevel}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="label != null and label != ''"> and label = #{label}</if>
|
||||
<if test="dutyBy != null and dutyBy != ''"> and duty_by = #{dutyBy}</if>
|
||||
<if test="runEnvironment != null and runEnvironment != ''"> and run_environment = #{runEnvironment}</if>
|
||||
<if test="stepsNumber != null "> and steps_number = #{stepsNumber}</if>
|
||||
<if test="executionResult != null and executionResult != ''"> and execution_result = #{executionResult}</if>
|
||||
<if test="passRate != null and passRate != ''"> and pass_rate = #{passRate}</if>
|
||||
<if test="crontab != null and crontab != ''"> and crontab = #{crontab}</if>
|
||||
<if test="crontabStatus != null "> and crontab_status = #{crontabStatus}</if>
|
||||
<if test="delFlag != null "> and del_flag = #{delFlag}</if>
|
||||
<if test="description != null "> and description = #{description}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUiAutomationListNew" parameterType="UiAutomationQO" resultMap="UiAutomationResult">
|
||||
<include refid="selectUiAutomationVo"/>
|
||||
<where>
|
||||
|
||||
<!-- 关键词搜索(OR条件) -->
|
||||
<if test="keyword != null and keyword != ''">
|
||||
and (
|
||||
id = #{keyword} <!-- 假设id可以字符串匹配 -->
|
||||
or name like concat('%', #{keyword}, '%')
|
||||
or label like concat('%', #{keyword}, '%')
|
||||
<!-- 如果有其他需要搜索的字段也可以添加 -->
|
||||
)
|
||||
</if>
|
||||
<!-- 组ID条件(支持单个groupId或groupIds集合) -->
|
||||
<if test="groupIds != null and groupIds.size() > 0">
|
||||
and group_id in
|
||||
<foreach collection="groupIds" item="groupId" open="(" separator="," close=")">
|
||||
#{groupId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!-- 名称模糊查询 -->
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 状态条件 -->
|
||||
<if test="delFlag != null and delFlag != ''">
|
||||
and del_flag = #{delFlag}
|
||||
</if>
|
||||
|
||||
<!-- 创建时间范围查询 -->
|
||||
<if test="startTime != null">
|
||||
and create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and create_time <= #{endTime}
|
||||
</if>
|
||||
|
||||
<!-- 创建人查询 -->
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
|
||||
<!-- 状态查询 -->
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
<!-- 可添加排序条件 -->
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<select id="selectUiAutomationById" parameterType="Long" resultMap="UiAutomationResult">
|
||||
<include refid="selectUiAutomationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUiAutomation" parameterType="UiAutomation" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ui_automation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="caseLevel != null">case_level,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="label != null">label,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="dutyBy != null">duty_by,</if>
|
||||
<if test="runEnvironment != null">run_environment,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="stepsNumber != null">steps_number,</if>
|
||||
<if test="executionResult != null">execution_result,</if>
|
||||
<if test="passRate != null">pass_rate,</if>
|
||||
<if test="crontab != null">crontab,</if>
|
||||
<if test="crontabStatus != null">crontab_status,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="description != null">description,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="groupId != null">#{groupId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="caseLevel != null">#{caseLevel},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="label != null">#{label},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="dutyBy != null">#{dutyBy},</if>
|
||||
<if test="runEnvironment != null">#{runEnvironment},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="stepsNumber != null">#{stepsNumber},</if>
|
||||
<if test="executionResult != null">#{executionResult},</if>
|
||||
<if test="passRate != null">#{passRate},</if>
|
||||
<if test="crontab != null">#{crontab},</if>
|
||||
<if test="crontabStatus != null">#{crontabStatus},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUiAutomation" parameterType="UiAutomation">
|
||||
update ui_automation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="groupId != null">group_id = #{groupId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="caseLevel != null">case_level = #{caseLevel},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="label != null">label = #{label},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="dutyBy != null">duty_by = #{dutyBy},</if>
|
||||
<if test="runEnvironment != null">run_environment = #{runEnvironment},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="stepsNumber != null">steps_number = #{stepsNumber},</if>
|
||||
<if test="executionResult != null">execution_result = #{executionResult},</if>
|
||||
<if test="passRate != null">pass_rate = #{passRate},</if>
|
||||
<if test="crontab != null">crontab = #{crontab},</if>
|
||||
<if test="crontabStatus != null">crontab_status = #{crontabStatus},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUiAutomationById" parameterType="Long">
|
||||
update ui_automation set del_flag = '1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUiAutomationByIds" parameterType="String">
|
||||
update ui_automation set del_flag = '1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteUiAutomationByGroupIds" parameterType="java.util.List">
|
||||
update ui_automation
|
||||
set del_flag = '1'
|
||||
where group_id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
110
test-test/src/main/resources/mapper/test/UiHighSettingMapper.xml
Normal file
110
test-test/src/main/resources/mapper/test/UiHighSettingMapper.xml
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.test.test.mapper.UiHighSettingMapper">
|
||||
|
||||
<resultMap type="UiHighSetting" id="UiHighSettingResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sceneStepsId" column="scene_steps_id" />
|
||||
<result property="settingType" column="setting_type" />
|
||||
<result property="name" column="name" />
|
||||
<result property="operateType" column="operate_type" />
|
||||
<result property="awateTime" column="awate_time" />
|
||||
<result property="assertionJson" column="assertion_json" />
|
||||
<result property="extractionDataJson" column="extraction_data_json" />
|
||||
<result property="errorHandling" column="error_handling" />
|
||||
<result property="otherSetting" column="other_setting" />
|
||||
<result property="orderNumber" column="order_number" />
|
||||
<result property="isDisabled" column="is_disabled" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUiHighSettingVo">
|
||||
select id, scene_steps_id, setting_type, name, operate_type, awate_time, assertion_json, extraction_data_json, error_handling, other_setting, order_number, is_disabled, del_flag from ui_high_setting
|
||||
</sql>
|
||||
|
||||
<select id="selectUiHighSettingList" parameterType="UiHighSetting" resultMap="UiHighSettingResult">
|
||||
<include refid="selectUiHighSettingVo"/>
|
||||
<where>
|
||||
<if test="sceneStepsId != null "> and scene_steps_id = #{sceneStepsId}</if>
|
||||
<if test="settingType != null and settingType != ''"> and setting_type = #{settingType}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="operateType != null and operateType != ''"> and operate_type = #{operateType}</if>
|
||||
<if test="awateTime != null and awateTime != ''"> and awate_time = #{awateTime}</if>
|
||||
<if test="assertionJson != null and assertionJson != ''"> and assertion_json = #{assertionJson}</if>
|
||||
<if test="extractionDataJson != null and extractionDataJson != ''"> and extraction_data_json = #{extractionDataJson}</if>
|
||||
<if test="errorHandling != null and errorHandling != ''"> and error_handling = #{errorHandling}</if>
|
||||
<if test="otherSetting != null and otherSetting != ''"> and other_setting = #{otherSetting}</if>
|
||||
<if test="orderNumber != null "> and order_number = #{orderNumber}</if>
|
||||
<if test="isDisabled != null "> and is_disabled = #{isDisabled}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUiHighSettingById" parameterType="Long" resultMap="UiHighSettingResult">
|
||||
<include refid="selectUiHighSettingVo"/>
|
||||
where scene_steps_id = #{sceneStepsId} and del_flag = 0 order by operate_type asc
|
||||
</select>
|
||||
|
||||
<insert id="insertUiHighSetting" parameterType="UiHighSetting" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ui_high_setting
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sceneStepsId != null">scene_steps_id,</if>
|
||||
<if test="settingType != null">setting_type,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="operateType != null">operate_type,</if>
|
||||
<if test="awateTime != null">awate_time,</if>
|
||||
<if test="assertionJson != null">assertion_json,</if>
|
||||
<if test="extractionDataJson != null">extraction_data_json,</if>
|
||||
<if test="errorHandling != null">error_handling,</if>
|
||||
<if test="otherSetting != null">other_setting,</if>
|
||||
<if test="orderNumber != null">order_number,</if>
|
||||
<if test="isDisabled != null">is_disabled,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sceneStepsId != null">#{sceneStepsId},</if>
|
||||
<if test="settingType != null">#{settingType},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="operateType != null">#{operateType},</if>
|
||||
<if test="awateTime != null">#{awateTime},</if>
|
||||
<if test="assertionJson != null">#{assertionJson},</if>
|
||||
<if test="extractionDataJson != null">#{extractionDataJson},</if>
|
||||
<if test="errorHandling != null">#{errorHandling},</if>
|
||||
<if test="otherSetting != null">#{otherSetting},</if>
|
||||
<if test="orderNumber != null">#{orderNumber},</if>
|
||||
<if test="isDisabled != null">#{isDisabled},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUiHighSetting" parameterType="UiHighSetting">
|
||||
update ui_high_setting
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sceneStepsId != null">scene_steps_id = #{sceneStepsId},</if>
|
||||
<if test="settingType != null">setting_type = #{settingType},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="operateType != null">operate_type = #{operateType},</if>
|
||||
<if test="awateTime != null">awate_time = #{awateTime},</if>
|
||||
<if test="assertionJson != null">assertion_json = #{assertionJson},</if>
|
||||
<if test="extractionDataJson != null">extraction_data_json = #{extractionDataJson},</if>
|
||||
<if test="errorHandling != null">error_handling = #{errorHandling},</if>
|
||||
<if test="otherSetting != null">other_setting = #{otherSetting},</if>
|
||||
<if test="orderNumber != null">order_number = #{orderNumber},</if>
|
||||
<if test="isDisabled != null">is_disabled = #{isDisabled},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUiHighSettingById" parameterType="Long">
|
||||
delete from ui_high_setting where scene_steps_id = #{sceneStepsId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUiHighSettingByIds" parameterType="String">
|
||||
delete from ui_high_setting where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
188
test-test/src/main/resources/mapper/test/UiSceneStepsMapper.xml
Normal file
188
test-test/src/main/resources/mapper/test/UiSceneStepsMapper.xml
Normal file
@@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.test.test.mapper.UiSceneStepsMapper">
|
||||
|
||||
<resultMap type="UiSceneSteps" id="UiSceneStepsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="automationId" column="automation_id" />
|
||||
<result property="operateType" column="operate_type" />
|
||||
<result property="name" column="name" />
|
||||
<result property="stepType" column="step_type" />
|
||||
<result property="url" column="url" />
|
||||
<result property="isAppendPage" column="is_append_page" />
|
||||
<result property="operate" column="operate" />
|
||||
<result property="operateObject" column="operate_object" />
|
||||
<result property="operateGroupId" column="operate_group_id" />
|
||||
<result property="operateElementId" column="operate_element_id" />
|
||||
<result property="operateLocType" column="operate_loc_type" />
|
||||
<result property="operateLocValue" column="operate_loc_value" />
|
||||
<result property="clickMethod" column="click_method" />
|
||||
<result property="inputValue" column="Input_value" />
|
||||
<result property="windowSize" column="window_size" />
|
||||
<result property="subOptions" column="sub_options" />
|
||||
<result property="subOptionsValue" column="sub_options_value" />
|
||||
<result property="awaitValue" column="await_value" />
|
||||
<result property="isDisabled" column="is_disabled" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="orderNumber" column="order_number" />
|
||||
<result property="handleId" column="handle_id" />
|
||||
<result property="pageIndex" column="page_index" />
|
||||
<result property="frameIndex" column="frame_index" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUiSceneStepsVo">
|
||||
select id, automation_id, operate_type, name, step_type, url, is_append_page, operate, operate_object, operate_group_id, operate_element_id, operate_loc_type, operate_loc_value, click_method, Input_value, window_size, sub_options, sub_options_value, await_value, is_disabled, del_flag, create_by, create_time, update_by, update_time, order_number, handle_id, page_index, frame_index from ui_scene_steps
|
||||
</sql>
|
||||
|
||||
<select id="selectUiSceneStepsList" parameterType="UiSceneSteps" resultMap="UiSceneStepsResult">
|
||||
<include refid="selectUiSceneStepsVo"/>
|
||||
<where>
|
||||
<if test="automationId != null "> and automation_id = #{automationId}</if>
|
||||
<if test="operateType != null and operateType != ''"> and operate_type = #{operateType}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="stepType != null and stepType != ''"> and step_type = #{stepType}</if>
|
||||
<if test="url != null and url != ''"> and url = #{url}</if>
|
||||
<if test="isAppendPage != null "> and is_append_page = #{isAppendPage}</if>
|
||||
<if test="operate != null "> and operate = #{operate}</if>
|
||||
<if test="operateObject != null and operateObject != ''"> and operate_object = #{operateObject}</if>
|
||||
<if test="operateGroupId != null "> and operate_group_id = #{operateGroupId}</if>
|
||||
<if test="operateElementId != null "> and operate_element_id = #{operateElementId}</if>
|
||||
<if test="operateLocType != null and operateLocType != ''"> and operate_loc_type = #{operateLocType}</if>
|
||||
<if test="operateLocValue != null and operateLocValue != ''"> and operate_loc_value = #{operateLocValue}</if>
|
||||
<if test="clickMethod != null and clickMethod != ''"> and click_method = #{clickMethod}</if>
|
||||
<if test="inputValue != null and inputValue != ''"> and Input_value = #{inputValue}</if>
|
||||
<if test="windowSize != null "> and window_size = #{windowSize}</if>
|
||||
<if test="subOptions != null and subOptions != ''"> and sub_options = #{subOptions}</if>
|
||||
<if test="subOptionsValue != null and subOptionsValue != ''"> and sub_options_value = #{subOptionsValue}</if>
|
||||
<if test="awaitValue != null and awaitValue != ''"> and await_value = #{awaitValue}</if>
|
||||
<if test="isDisabled != null "> and is_disabled = #{isDisabled}</if>
|
||||
<if test="orderNumber != null "> and order_number = #{orderNumber}</if>
|
||||
<if test="handleId != null and handleId != ''"> and handle_id = #{handleId}</if>
|
||||
<if test="pageIndex != null "> and page_index = #{pageIndex}</if>
|
||||
<if test="frameIndex != null "> and frame_index = #{frameIndex}</if>
|
||||
<if test="delFlag != null "> and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUiSceneStepsById" parameterType="Long" resultMap="UiSceneStepsResult">
|
||||
<include refid="selectUiSceneStepsVo"/>
|
||||
where automation_id = #{automationId} and del_flag = 0
|
||||
order by order_number asc
|
||||
</select>
|
||||
|
||||
<insert id="insertUiSceneSteps" parameterType="UiSceneSteps" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ui_scene_steps
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="automationId != null">automation_id,</if>
|
||||
<if test="operateType != null">operate_type,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="stepType != null">step_type,</if>
|
||||
<if test="url != null">url,</if>
|
||||
<if test="isAppendPage != null">is_append_page,</if>
|
||||
<if test="operate != null">operate,</if>
|
||||
<if test="operateObject != null">operate_object,</if>
|
||||
<if test="operateGroupId != null">operate_group_id,</if>
|
||||
<if test="operateElementId != null">operate_element_id,</if>
|
||||
<if test="operateLocType != null">operate_loc_type,</if>
|
||||
<if test="operateLocValue != null">operate_loc_value,</if>
|
||||
<if test="clickMethod != null">click_method,</if>
|
||||
<if test="inputValue != null">Input_value,</if>
|
||||
<if test="windowSize != null">window_size,</if>
|
||||
<if test="subOptions != null">sub_options,</if>
|
||||
<if test="subOptionsValue != null">sub_options_value,</if>
|
||||
<if test="awaitValue != null">await_value,</if>
|
||||
<if test="isDisabled != null">is_disabled,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="orderNumber != null">order_number,</if>
|
||||
<if test="handleId != null">handle_id,</if>
|
||||
<if test="pageIndex != null">page_index,</if>
|
||||
<if test="frameIndex != null">frame_index,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="automationId != null">#{automationId},</if>
|
||||
<if test="operateType != null">#{operateType},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="stepType != null">#{stepType},</if>
|
||||
<if test="url != null">#{url},</if>
|
||||
<if test="isAppendPage != null">#{isAppendPage},</if>
|
||||
<if test="operate != null">#{operate},</if>
|
||||
<if test="operateObject != null">#{operateObject},</if>
|
||||
<if test="operateGroupId != null">#{operateGroupId},</if>
|
||||
<if test="operateElementId != null">#{operateElementId},</if>
|
||||
<if test="operateLocType != null">#{operateLocType},</if>
|
||||
<if test="operateLocValue != null">#{operateLocValue},</if>
|
||||
<if test="clickMethod != null">#{clickMethod},</if>
|
||||
<if test="inputValue != null">#{inputValue},</if>
|
||||
<if test="windowSize != null">#{windowSize},</if>
|
||||
<if test="subOptions != null">#{subOptions},</if>
|
||||
<if test="subOptionsValue != null">#{subOptionsValue},</if>
|
||||
<if test="awaitValue != null">#{awaitValue},</if>
|
||||
<if test="isDisabled != null">#{isDisabled},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="orderNumber != null">#{orderNumber},</if>
|
||||
<if test="handleId != null">#{handleId},</if>
|
||||
<if test="pageIndex != null">#{pageIndex},</if>
|
||||
<if test="frameIndex != null">#{frameIndex},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUiSceneSteps" parameterType="UiSceneSteps">
|
||||
update ui_scene_steps
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="automationId != null">automation_id = #{automationId},</if>
|
||||
<if test="operateType != null">operate_type = #{operateType},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="stepType != null">step_type = #{stepType},</if>
|
||||
<if test="url != null">url = #{url},</if>
|
||||
<if test="isAppendPage != null">is_append_page = #{isAppendPage},</if>
|
||||
<if test="operate != null">operate = #{operate},</if>
|
||||
<if test="operateObject != null">operate_object = #{operateObject},</if>
|
||||
<if test="operateGroupId != null">operate_group_id = #{operateGroupId},</if>
|
||||
<if test="operateElementId != null">operate_element_id = #{operateElementId},</if>
|
||||
<if test="operateLocType != null">operate_loc_type = #{operateLocType},</if>
|
||||
<if test="operateLocValue != null">operate_loc_value = #{operateLocValue},</if>
|
||||
<if test="clickMethod != null">click_method = #{clickMethod},</if>
|
||||
<if test="inputValue != null">Input_value = #{inputValue},</if>
|
||||
<if test="windowSize != null">window_size = #{windowSize},</if>
|
||||
<if test="subOptions != null">sub_options = #{subOptions},</if>
|
||||
<if test="subOptionsValue != null">sub_options_value = #{subOptionsValue},</if>
|
||||
<if test="awaitValue != null">await_value = #{awaitValue},</if>
|
||||
<if test="isDisabled != null">is_disabled = #{isDisabled},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="orderNumber != null">order_number = #{orderNumber},</if>
|
||||
<if test="handleId != null">handle_id = #{handleId},</if>
|
||||
<if test="pageIndex != null">page_index = #{pageIndex},</if>
|
||||
<if test="frameIndex != null">frame_index = #{frameIndex},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUiSceneStepsById" parameterType="Long">
|
||||
delete from ui_scene_steps where automation_id = #{automationId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUiSceneStepsByIds" parameterType="String">
|
||||
delete from ui_scene_steps where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user