From bfea4863500b7e551a6bfaeac3635ad4e11ed94a Mon Sep 17 00:00:00 2001 From: FBODC Date: Wed, 23 Apr 2025 17:52:44 +0800 Subject: [PATCH] =?UTF-8?q?UI=20=E8=87=AA=E5=8A=A8=E5=8C=96=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=20=E5=9C=BA=E6=99=AF=E6=AD=A5=E9=AA=A4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UiAutomationController.java | 119 ++++++ .../com/test/test/domain/UiAutomation.java | 232 +++++++++++ .../com/test/test/domain/UiHighSetting.java | 204 ++++++++++ .../com/test/test/domain/UiSceneSteps.java | 376 ++++++++++++++++++ .../com/test/test/domain/qo/AssertionQO.java | 56 +++ .../test/test/domain/qo/DataExtractionQO.java | 47 +++ .../test/test/domain/qo/OtherSettingsQO.java | 9 + .../test/domain/qo/UiAutomationDataQO.java | 69 ++++ .../test/test/domain/qo/UiAutomationQO.java | 48 +++ .../com/test/test/domain/qo/UiElementQO.java | 2 +- .../test/test/domain/qo/UiHighSettingQO.java | 71 ++++ .../test/test/domain/qo/UiSceneStepsQO.java | 103 +++++ .../test/test/domain/vo/UiAutomationVO.java | 50 +++ .../test/test/domain/vo/UiHighSettingVO.java | 59 +++ .../test/test/domain/vo/UiSceneStepsVO.java | 97 +++++ .../test/test/mapper/UiAutomationMapper.java | 77 ++++ .../test/test/mapper/UiHighSettingMapper.java | 62 +++ .../test/test/mapper/UiSceneStepsMapper.java | 62 +++ .../test/test/service/ITestGroupService.java | 2 +- .../test/service/IUiAutomationService.java | 65 +++ .../test/service/IUiSceneStepsService.java | 62 +++ .../service/impl/TestGroupServiceImpl.java | 32 +- .../service/impl/UiAutomationServiceImpl.java | 320 +++++++++++++++ .../service/impl/UiElementServiceImpl.java | 7 +- .../service/impl/UiSceneStepsServiceImpl.java | 97 +++++ .../mapper/test/UiAutomationMapper.xml | 193 +++++++++ .../mapper/test/UiHighSettingMapper.xml | 110 +++++ .../mapper/test/UiSceneStepsMapper.xml | 188 +++++++++ 28 files changed, 2810 insertions(+), 9 deletions(-) create mode 100644 test-test/src/main/java/com/test/test/controller/UiAutomationController.java create mode 100644 test-test/src/main/java/com/test/test/domain/UiAutomation.java create mode 100644 test-test/src/main/java/com/test/test/domain/UiHighSetting.java create mode 100644 test-test/src/main/java/com/test/test/domain/UiSceneSteps.java create mode 100644 test-test/src/main/java/com/test/test/domain/qo/AssertionQO.java create mode 100644 test-test/src/main/java/com/test/test/domain/qo/DataExtractionQO.java create mode 100644 test-test/src/main/java/com/test/test/domain/qo/OtherSettingsQO.java create mode 100644 test-test/src/main/java/com/test/test/domain/qo/UiAutomationDataQO.java create mode 100644 test-test/src/main/java/com/test/test/domain/qo/UiAutomationQO.java create mode 100644 test-test/src/main/java/com/test/test/domain/qo/UiHighSettingQO.java create mode 100644 test-test/src/main/java/com/test/test/domain/qo/UiSceneStepsQO.java create mode 100644 test-test/src/main/java/com/test/test/domain/vo/UiAutomationVO.java create mode 100644 test-test/src/main/java/com/test/test/domain/vo/UiHighSettingVO.java create mode 100644 test-test/src/main/java/com/test/test/domain/vo/UiSceneStepsVO.java create mode 100644 test-test/src/main/java/com/test/test/mapper/UiAutomationMapper.java create mode 100644 test-test/src/main/java/com/test/test/mapper/UiHighSettingMapper.java create mode 100644 test-test/src/main/java/com/test/test/mapper/UiSceneStepsMapper.java create mode 100644 test-test/src/main/java/com/test/test/service/IUiAutomationService.java create mode 100644 test-test/src/main/java/com/test/test/service/IUiSceneStepsService.java create mode 100644 test-test/src/main/java/com/test/test/service/impl/UiAutomationServiceImpl.java create mode 100644 test-test/src/main/java/com/test/test/service/impl/UiSceneStepsServiceImpl.java create mode 100644 test-test/src/main/resources/mapper/test/UiAutomationMapper.xml create mode 100644 test-test/src/main/resources/mapper/test/UiHighSettingMapper.xml create mode 100644 test-test/src/main/resources/mapper/test/UiSceneStepsMapper.xml diff --git a/test-test/src/main/java/com/test/test/controller/UiAutomationController.java b/test-test/src/main/java/com/test/test/controller/UiAutomationController.java new file mode 100644 index 0000000..feaf040 --- /dev/null +++ b/test-test/src/main/java/com/test/test/controller/UiAutomationController.java @@ -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 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 list = uiAutomationService.selectUiAutomationList(uiAutomation); +// ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/test-test/src/main/java/com/test/test/domain/UiAutomation.java b/test-test/src/main/java/com/test/test/domain/UiAutomation.java new file mode 100644 index 0000000..72ca112 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/UiAutomation.java @@ -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(); + } +} diff --git a/test-test/src/main/java/com/test/test/domain/UiHighSetting.java b/test-test/src/main/java/com/test/test/domain/UiHighSetting.java new file mode 100644 index 0000000..54b9482 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/UiHighSetting.java @@ -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(); + } +} diff --git a/test-test/src/main/java/com/test/test/domain/UiSceneSteps.java b/test-test/src/main/java/com/test/test/domain/UiSceneSteps.java new file mode 100644 index 0000000..e6ed466 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/UiSceneSteps.java @@ -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(); + } +} diff --git a/test-test/src/main/java/com/test/test/domain/qo/AssertionQO.java b/test-test/src/main/java/com/test/test/domain/qo/AssertionQO.java new file mode 100644 index 0000000..d447797 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/qo/AssertionQO.java @@ -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; +} diff --git a/test-test/src/main/java/com/test/test/domain/qo/DataExtractionQO.java b/test-test/src/main/java/com/test/test/domain/qo/DataExtractionQO.java new file mode 100644 index 0000000..869b215 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/qo/DataExtractionQO.java @@ -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; + + +} diff --git a/test-test/src/main/java/com/test/test/domain/qo/OtherSettingsQO.java b/test-test/src/main/java/com/test/test/domain/qo/OtherSettingsQO.java new file mode 100644 index 0000000..8ddd027 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/qo/OtherSettingsQO.java @@ -0,0 +1,9 @@ +package com.test.test.domain.qo; + +import lombok.Data; + +@Data +public class OtherSettingsQO { + private Integer waitElementTime; + private Integer screenshotConfiguration; +} diff --git a/test-test/src/main/java/com/test/test/domain/qo/UiAutomationDataQO.java b/test-test/src/main/java/com/test/test/domain/qo/UiAutomationDataQO.java new file mode 100644 index 0000000..3742e56 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/qo/UiAutomationDataQO.java @@ -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 uiSceneStepsQOList = new ArrayList<>(); + +} diff --git a/test-test/src/main/java/com/test/test/domain/qo/UiAutomationQO.java b/test-test/src/main/java/com/test/test/domain/qo/UiAutomationQO.java new file mode 100644 index 0000000..846e182 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/qo/UiAutomationQO.java @@ -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 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; +} diff --git a/test-test/src/main/java/com/test/test/domain/qo/UiElementQO.java b/test-test/src/main/java/com/test/test/domain/qo/UiElementQO.java index f9133aa..8d1aec9 100644 --- a/test-test/src/main/java/com/test/test/domain/qo/UiElementQO.java +++ b/test-test/src/main/java/com/test/test/domain/qo/UiElementQO.java @@ -22,7 +22,7 @@ public class UiElementQO private String name; /** 状态 0正常 1删除 */ private String delFlag; - @NotNull(message = "节点id不能为空") + private Long groupId; private List groupIds; diff --git a/test-test/src/main/java/com/test/test/domain/qo/UiHighSettingQO.java b/test-test/src/main/java/com/test/test/domain/qo/UiHighSettingQO.java new file mode 100644 index 0000000..4540ff3 --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/qo/UiHighSettingQO.java @@ -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 dataExtractionQOList = new ArrayList<>(); + + /**断言*/ + private List assertionQOList = new ArrayList<>(); + +} diff --git a/test-test/src/main/java/com/test/test/domain/qo/UiSceneStepsQO.java b/test-test/src/main/java/com/test/test/domain/qo/UiSceneStepsQO.java new file mode 100644 index 0000000..43624ed --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/qo/UiSceneStepsQO.java @@ -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 uiHighSettingList = new ArrayList<>(); + +} diff --git a/test-test/src/main/java/com/test/test/domain/vo/UiAutomationVO.java b/test-test/src/main/java/com/test/test/domain/vo/UiAutomationVO.java new file mode 100644 index 0000000..18e397a --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/vo/UiAutomationVO.java @@ -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 uiSceneStepsVOList = new ArrayList<>(); + +} diff --git a/test-test/src/main/java/com/test/test/domain/vo/UiHighSettingVO.java b/test-test/src/main/java/com/test/test/domain/vo/UiHighSettingVO.java new file mode 100644 index 0000000..b7eaedb --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/vo/UiHighSettingVO.java @@ -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 assertionQOList = new ArrayList<>(); + + /**数据提取*/ + private List dataExtractionQOList = new ArrayList<>(); + + /**其他设置*/ + private OtherSettingsQO otherSettingsQO; + +} diff --git a/test-test/src/main/java/com/test/test/domain/vo/UiSceneStepsVO.java b/test-test/src/main/java/com/test/test/domain/vo/UiSceneStepsVO.java new file mode 100644 index 0000000..f2d71aa --- /dev/null +++ b/test-test/src/main/java/com/test/test/domain/vo/UiSceneStepsVO.java @@ -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 uiHighSettingVOList = new ArrayList<>(); + +} diff --git a/test-test/src/main/java/com/test/test/mapper/UiAutomationMapper.java b/test-test/src/main/java/com/test/test/mapper/UiAutomationMapper.java new file mode 100644 index 0000000..79f3bd9 --- /dev/null +++ b/test-test/src/main/java/com/test/test/mapper/UiAutomationMapper.java @@ -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 selectUiAutomationList(UiAutomation uiAutomation); + + /** + * 查询ui自动化列表 + * @param uiAutomation + * @return + */ + public List 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 ids); +} diff --git a/test-test/src/main/java/com/test/test/mapper/UiHighSettingMapper.java b/test-test/src/main/java/com/test/test/mapper/UiHighSettingMapper.java new file mode 100644 index 0000000..f440dd6 --- /dev/null +++ b/test-test/src/main/java/com/test/test/mapper/UiHighSettingMapper.java @@ -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 selectUiHighSettingById(Long id); + + /** + * 查询ui高级设置列表 + * + * @param uiHighSetting ui高级设置 + * @return ui高级设置集合 + */ + public List 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); +} diff --git a/test-test/src/main/java/com/test/test/mapper/UiSceneStepsMapper.java b/test-test/src/main/java/com/test/test/mapper/UiSceneStepsMapper.java new file mode 100644 index 0000000..0d06c03 --- /dev/null +++ b/test-test/src/main/java/com/test/test/mapper/UiSceneStepsMapper.java @@ -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 selectUiSceneStepsById(Long automationId); + + /** + * 查询ui自动化场景步骤列表 + * + * @param uiSceneSteps ui自动化场景步骤 + * @return ui自动化场景步骤集合 + */ + public List 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); +} diff --git a/test-test/src/main/java/com/test/test/service/ITestGroupService.java b/test-test/src/main/java/com/test/test/service/ITestGroupService.java index 1c2ea77..3f69e78 100644 --- a/test-test/src/main/java/com/test/test/service/ITestGroupService.java +++ b/test-test/src/main/java/com/test/test/service/ITestGroupService.java @@ -41,7 +41,7 @@ public interface ITestGroupService { * @param id * @return */ - List getAllChildIds(Long id); + List getAllChildIds(Long id,String type); /** * 获取模块名 diff --git a/test-test/src/main/java/com/test/test/service/IUiAutomationService.java b/test-test/src/main/java/com/test/test/service/IUiAutomationService.java new file mode 100644 index 0000000..2df3dec --- /dev/null +++ b/test-test/src/main/java/com/test/test/service/IUiAutomationService.java @@ -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 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); +} diff --git a/test-test/src/main/java/com/test/test/service/IUiSceneStepsService.java b/test-test/src/main/java/com/test/test/service/IUiSceneStepsService.java new file mode 100644 index 0000000..8a3cc95 --- /dev/null +++ b/test-test/src/main/java/com/test/test/service/IUiSceneStepsService.java @@ -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 selectUiSceneStepsById(Long id); + + /** + * 查询ui自动化场景步骤列表 + * + * @param uiSceneSteps ui自动化场景步骤 + * @return ui自动化场景步骤集合 + */ + public List 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); +} diff --git a/test-test/src/main/java/com/test/test/service/impl/TestGroupServiceImpl.java b/test-test/src/main/java/com/test/test/service/impl/TestGroupServiceImpl.java index 151f025..a3f76cd 100644 --- a/test-test/src/main/java/com/test/test/service/impl/TestGroupServiceImpl.java +++ b/test-test/src/main/java/com/test/test/service/impl/TestGroupServiceImpl.java @@ -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 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 getAllChildIds(Long id) { - List allGroups = selectTestGroupList("ui"); + public List getAllChildIds(Long id,String type) { + List allGroups = selectTestGroupList(type); List result = new ArrayList<>(); // 如果传入的是根节点(parentId=0),则查询所有数据 diff --git a/test-test/src/main/java/com/test/test/service/impl/UiAutomationServiceImpl.java b/test-test/src/main/java/com/test/test/service/impl/UiAutomationServiceImpl.java new file mode 100644 index 0000000..d096f04 --- /dev/null +++ b/test-test/src/main/java/com/test/test/service/impl/UiAutomationServiceImpl.java @@ -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 uiSceneStepsList = uiSceneStepsMapper.selectUiSceneStepsById(id); + for (UiSceneSteps uiSceneSteps : uiSceneStepsList) { + UiSceneStepsVO uiSceneStepsVO = new UiSceneStepsVO(); + BeanUtils.copyProperties(uiSceneSteps, uiSceneStepsVO); + uiAutomationVO.getUiSceneStepsVOList().add(uiSceneStepsVO); + List uiHighSettings = uiHighSettingMapper.selectUiHighSettingById(uiSceneSteps.getId()); + for (UiHighSetting uiHighSetting : uiHighSettings) { + UiHighSettingVO uiHighSettingVO = new UiHighSettingVO(); + BeanUtils.copyProperties(uiHighSetting, uiHighSettingVO); + // 转换assertionJson 断言 + if (StringUtils.isNotBlank(uiHighSetting.getAssertionJson())) { + List assertionList = null; + try { + assertionList = objectMapper.readValue( + uiHighSetting.getAssertionJson(), + new TypeReference>() { + } + ); + uiHighSettingVO.setAssertionQOList(assertionList); + // 转换extractionDataJson 数据提取 + if (StringUtils.isNotBlank(uiHighSetting.getExtractionDataJson())) { + List extractionData = null; + extractionData = objectMapper.readValue( + uiHighSetting.getExtractionDataJson(), + new TypeReference>(){ + } // 根据实际结构可以定义具体类 + ); + 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 selectUiAutomationList(UiAutomationQO uiAutomation) { + uiAutomation.setDelFlag("0"); + //这里要递归查询子元素 + Long groupId = uiAutomation.getGroupId(); + if (groupId != null) { + List allChildIds = testGroupService.getAllChildIds(groupId, "automation"); + uiAutomation.setGroupIds(allChildIds); + } + // 查询元素列表 + List 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 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 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 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 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); + } +} diff --git a/test-test/src/main/java/com/test/test/service/impl/UiElementServiceImpl.java b/test-test/src/main/java/com/test/test/service/impl/UiElementServiceImpl.java index 05089ab..2a1e8a7 100644 --- a/test-test/src/main/java/com/test/test/service/impl/UiElementServiceImpl.java +++ b/test-test/src/main/java/com/test/test/service/impl/UiElementServiceImpl.java @@ -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 allChildIds = testGroupService.getAllChildIds(groupId); - uiElement.setGroupIds(allChildIds); + if (groupId != null){ + List allChildIds = testGroupService.getAllChildIds(groupId,"element"); + uiElement.setGroupIds(allChildIds); + } // 查询元素列表 List elements = uiElementMapper.selectUiElementListNew(uiElement); diff --git a/test-test/src/main/java/com/test/test/service/impl/UiSceneStepsServiceImpl.java b/test-test/src/main/java/com/test/test/service/impl/UiSceneStepsServiceImpl.java new file mode 100644 index 0000000..0bb0e59 --- /dev/null +++ b/test-test/src/main/java/com/test/test/service/impl/UiSceneStepsServiceImpl.java @@ -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 selectUiSceneStepsById(Long id) + { + return uiSceneStepsMapper.selectUiSceneStepsById(id); + } + + /** + * 查询ui自动化场景步骤列表 + * + * @param uiSceneSteps ui自动化场景步骤 + * @return ui自动化场景步骤 + */ + @Override + public List 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); + } +} diff --git a/test-test/src/main/resources/mapper/test/UiAutomationMapper.xml b/test-test/src/main/resources/mapper/test/UiAutomationMapper.xml new file mode 100644 index 0000000..85373ab --- /dev/null +++ b/test-test/src/main/resources/mapper/test/UiAutomationMapper.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + insert into ui_automation + + 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, + + + #{groupId}, + #{name}, + #{caseLevel}, + #{status}, + #{label}, + #{createBy}, + #{dutyBy}, + #{runEnvironment}, + #{updateTime}, + #{stepsNumber}, + #{executionResult}, + #{passRate}, + #{crontab}, + #{crontabStatus}, + #{delFlag}, + #{description}, + + + + + update ui_automation + + group_id = #{groupId}, + name = #{name}, + case_level = #{caseLevel}, + status = #{status}, + label = #{label}, + create_by = #{createBy}, + duty_by = #{dutyBy}, + run_environment = #{runEnvironment}, + update_time = #{updateTime}, + steps_number = #{stepsNumber}, + execution_result = #{executionResult}, + pass_rate = #{passRate}, + crontab = #{crontab}, + crontab_status = #{crontabStatus}, + del_flag = #{delFlag}, + description = #{description}, + + where id = #{id} + + + + update ui_automation set del_flag = '1' where id = #{id} + + + + update ui_automation set del_flag = '1' where id in + + #{id} + + + + + + update ui_automation + set del_flag = '1' + where group_id in + + #{id} + + + \ No newline at end of file diff --git a/test-test/src/main/resources/mapper/test/UiHighSettingMapper.xml b/test-test/src/main/resources/mapper/test/UiHighSettingMapper.xml new file mode 100644 index 0000000..102b6bd --- /dev/null +++ b/test-test/src/main/resources/mapper/test/UiHighSettingMapper.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into ui_high_setting + + 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, + + + #{sceneStepsId}, + #{settingType}, + #{name}, + #{operateType}, + #{awateTime}, + #{assertionJson}, + #{extractionDataJson}, + #{errorHandling}, + #{otherSetting}, + #{orderNumber}, + #{isDisabled}, + #{delFlag}, + + + + + update ui_high_setting + + scene_steps_id = #{sceneStepsId}, + setting_type = #{settingType}, + name = #{name}, + operate_type = #{operateType}, + awate_time = #{awateTime}, + assertion_json = #{assertionJson}, + extraction_data_json = #{extractionDataJson}, + error_handling = #{errorHandling}, + other_setting = #{otherSetting}, + order_number = #{orderNumber}, + is_disabled = #{isDisabled}, + del_flag = #{delFlag}, + + where id = #{id} + + + + delete from ui_high_setting where scene_steps_id = #{sceneStepsId} + + + + delete from ui_high_setting where id in + + #{id} + + + \ No newline at end of file diff --git a/test-test/src/main/resources/mapper/test/UiSceneStepsMapper.xml b/test-test/src/main/resources/mapper/test/UiSceneStepsMapper.xml new file mode 100644 index 0000000..7e07fb8 --- /dev/null +++ b/test-test/src/main/resources/mapper/test/UiSceneStepsMapper.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into ui_scene_steps + + 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, + + + #{automationId}, + #{operateType}, + #{name}, + #{stepType}, + #{url}, + #{isAppendPage}, + #{operate}, + #{operateObject}, + #{operateGroupId}, + #{operateElementId}, + #{operateLocType}, + #{operateLocValue}, + #{clickMethod}, + #{inputValue}, + #{windowSize}, + #{subOptions}, + #{subOptionsValue}, + #{awaitValue}, + #{isDisabled}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{orderNumber}, + #{handleId}, + #{pageIndex}, + #{frameIndex}, + + + + + update ui_scene_steps + + automation_id = #{automationId}, + operate_type = #{operateType}, + name = #{name}, + step_type = #{stepType}, + url = #{url}, + is_append_page = #{isAppendPage}, + operate = #{operate}, + operate_object = #{operateObject}, + operate_group_id = #{operateGroupId}, + operate_element_id = #{operateElementId}, + operate_loc_type = #{operateLocType}, + operate_loc_value = #{operateLocValue}, + click_method = #{clickMethod}, + Input_value = #{inputValue}, + window_size = #{windowSize}, + sub_options = #{subOptions}, + sub_options_value = #{subOptionsValue}, + await_value = #{awaitValue}, + is_disabled = #{isDisabled}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + order_number = #{orderNumber}, + handle_id = #{handleId}, + page_index = #{pageIndex}, + frame_index = #{frameIndex}, + + where id = #{id} + + + + delete from ui_scene_steps where automation_id = #{automationId} + + + + delete from ui_scene_steps where id in + + #{id} + + + \ No newline at end of file